Fix windows some issues
Optimize overwrite handle Optimize access control page Optimize some details
110
.github/workflows/build.yaml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
arch: amd64
|
arch: amd64
|
||||||
- platform: macos
|
- platform: macos
|
||||||
os: macos-13
|
os: macos-15-intel
|
||||||
arch: amd64
|
arch: amd64
|
||||||
- platform: macos
|
- platform: macos
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
@@ -64,22 +64,25 @@ jobs:
|
|||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
core/go.sum
|
core/go.sum
|
||||||
|
|
||||||
- name: Setup Flutter Master
|
|
||||||
if: startsWith(matrix.os, 'windows-11-arm') || startsWith(matrix.os, 'ubuntu-24.04-arm')
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: 'master'
|
|
||||||
cache: true
|
|
||||||
- name: Setup Flutter
|
- name: Setup Flutter
|
||||||
if: ${{ !(startsWith(matrix.os, 'windows-11-arm') || startsWith(matrix.os, 'ubuntu-24.04-arm')) }}
|
if: ${{ !(startsWith(matrix.os, 'windows-11-arm') || startsWith(matrix.os, 'ubuntu-24.04-arm')) }}
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: 'stable'
|
channel: stable
|
||||||
|
flutter-version: 3.35.7
|
||||||
|
cache: true
|
||||||
|
- name: Setup Flutter With Other
|
||||||
|
if: startsWith(matrix.os, 'windows-11-arm') || startsWith(matrix.os, 'ubuntu-24.04-arm')
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: master
|
||||||
|
flutter-version: 3.35.7
|
||||||
cache: true
|
cache: true
|
||||||
# flutter-version: 3.29.3
|
|
||||||
|
|
||||||
- name: Get Flutter Dependency
|
- name: Get Flutter Dependency
|
||||||
run: flutter pub get
|
run: |
|
||||||
|
flutter --version
|
||||||
|
flutter pub get
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: dart setup.dart ${{ matrix.platform }} ${{ matrix.arch && format('--arch {0}', matrix.arch) }} ${{ env.IS_STABLE == 'true' && '--env stable' || '' }}
|
run: dart setup.dart ${{ matrix.platform }} ${{ matrix.arch && format('--arch {0}', matrix.arch) }} ${{ env.IS_STABLE == 'true' && '--env stable' || '' }}
|
||||||
@@ -104,34 +107,26 @@ jobs:
|
|||||||
- name: Generate
|
- name: Generate
|
||||||
if: ${{ env.IS_STABLE == 'true' }}
|
if: ${{ env.IS_STABLE == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
tags=($(git tag --merged $(git rev-parse HEAD) --sort=-creatordate))
|
last_ver=$(grep -m1 '^## ' CHANGELOG.md 2>/dev/null | sed 's/^## //')
|
||||||
preTag=$(grep -oP '^## \K.*' CHANGELOG.md | head -n 1)
|
|
||||||
currentTag=""
|
tags=($(git tag --merged HEAD --sort=-creatordate))
|
||||||
for ((i = 0; i <= ${#tags[@]}; i++)); do
|
|
||||||
if (( i < ${#tags[@]} )); then
|
temp="NEW_CHANGELOG.md" > "$temp"
|
||||||
tag=${tags[$i]}
|
|
||||||
else
|
for i in "${!tags[@]}"; do
|
||||||
tag=""
|
curr="${tags[i]}"
|
||||||
fi
|
[[ "$curr" == "$last_ver" ]] && break
|
||||||
if [ -n "$currentTag" ]; then
|
|
||||||
if [ "$(echo -e "$currentTag\n$preTag" | sort -V | head -n 1)" == "$currentTag" ]; then
|
prev="${tags[i+1]}"
|
||||||
break
|
range="${prev:+$prev..}$curr"
|
||||||
fi
|
|
||||||
fi
|
echo -e "## $curr\n" >> "$temp"
|
||||||
if [ -n "$currentTag" ]; then
|
git log --no-merges --pretty=format:"%B" "$range" | \
|
||||||
echo "## $currentTag" >> NEW_CHANGELOG.md
|
awk '!/Update changelog/ && NF {print "- " $0 "\n"}' >> "$temp"
|
||||||
echo "" >> NEW_CHANGELOG.md
|
|
||||||
if [ -n "$tag" ]; then
|
|
||||||
git log --pretty=format:"%B" "$tag..$currentTag" | awk 'NF {print "- " $0} !NF {print ""}' >> NEW_CHANGELOG.md
|
|
||||||
else
|
|
||||||
git log --pretty=format:"%B" "$currentTag" | awk 'NF {print "- " $0} !NF {print ""}' >> NEW_CHANGELOG.md
|
|
||||||
fi
|
|
||||||
echo "" >> NEW_CHANGELOG.md
|
|
||||||
fi
|
|
||||||
currentTag=$tag
|
|
||||||
done
|
done
|
||||||
cat CHANGELOG.md >> NEW_CHANGELOG.md
|
[ -f CHANGELOG.md ] && cat CHANGELOG.md >> "$temp"
|
||||||
cat NEW_CHANGELOG.md > CHANGELOG.md
|
|
||||||
|
mv "$temp" CHANGELOG.md
|
||||||
|
|
||||||
- name: Commit
|
- name: Commit
|
||||||
if: ${{ env.IS_STABLE == 'true' }}
|
if: ${{ env.IS_STABLE == 'true' }}
|
||||||
@@ -181,31 +176,24 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate release.md
|
- name: Generate release.md
|
||||||
run: |
|
run: |
|
||||||
tags=($(git tag --merged $(git rev-parse HEAD) --sort=-creatordate))
|
tags=($(git tag --merged HEAD --sort=-creatordate))
|
||||||
preTag=$(curl --silent "https://api.github.com/repos/chen08209/FlClash/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' || echo "")
|
preTag=$(curl -s "https://api.github.com/repos/chen08209/FlClash/releases/latest" | \
|
||||||
currentTag=""
|
sed -nE 's/.*"tag_name": "([^"]+)".*/\1/p')
|
||||||
for ((i = 0; i <= ${#tags[@]}; i++)); do
|
|
||||||
if (( i < ${#tags[@]} )); then
|
[ -z "$preTag" ] && preTag=""
|
||||||
tag=${tags[$i]}
|
|
||||||
else
|
out="release.md" > "$out"
|
||||||
tag=""
|
|
||||||
fi
|
for i in "${!tags[@]}"; do
|
||||||
if [ -n "$currentTag" ]; then
|
curr="${tags[i]}"
|
||||||
if [ "$(echo -e "$currentTag\n$preTag" | sort -V | head -n 1)" == "$currentTag" ]; then
|
[[ "$curr" == "$preTag" ]] && break
|
||||||
break
|
|
||||||
fi
|
prev="${tags[i+1]}"
|
||||||
fi
|
range="${prev:+$prev..}$curr"
|
||||||
if [ -n "$currentTag" ]; then
|
|
||||||
if [ -n "$tag" ]; then
|
git log --no-merges --pretty=format:"%B" "$range" | \
|
||||||
git log --pretty=format:"%B" "$tag..$currentTag" | awk 'NF {print "- " $0} !NF {print ""}' >> release.md
|
awk '!/Update changelog/ && NF {print "- " $0 "\n"}' >> "$out"
|
||||||
else
|
|
||||||
git log --pretty=format:"%B" "$currentTag" | awk 'NF {print "- " $0} !NF {print ""}' >> release.md
|
|
||||||
fi
|
|
||||||
echo "" >> release.md
|
|
||||||
fi
|
|
||||||
currentTag=$tag
|
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Push to telegram
|
- name: Push to telegram
|
||||||
env:
|
env:
|
||||||
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||||
|
|||||||
4
.gitmodules
vendored
@@ -6,5 +6,9 @@
|
|||||||
path = plugins/flutter_distributor
|
path = plugins/flutter_distributor
|
||||||
url = git@github.com:chen08209/flutter_distributor.git
|
url = git@github.com:chen08209/flutter_distributor.git
|
||||||
branch = FlClash
|
branch = FlClash
|
||||||
|
[submodule "plugins/tray_manager"]
|
||||||
|
path = plugins/tray_manager
|
||||||
|
url = git@github.com:chen08209/tray_manager.git
|
||||||
|
branch = main
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -54,13 +54,17 @@ object State {
|
|||||||
|
|
||||||
suspend fun handleSyncState() {
|
suspend fun handleSyncState() {
|
||||||
runLock.withLock {
|
runLock.withLock {
|
||||||
Service.bind()
|
try {
|
||||||
runTime = Service.getRunTime()
|
Service.bind()
|
||||||
val runState = when (runTime == 0L) {
|
runTime = Service.getRunTime()
|
||||||
true -> RunState.STOP
|
val runState = when (runTime == 0L) {
|
||||||
false -> RunState.START
|
true -> RunState.STOP
|
||||||
|
false -> RunState.START
|
||||||
|
}
|
||||||
|
runStateFlow.tryEmit(runState)
|
||||||
|
} catch (_: Exception) {
|
||||||
|
runStateFlow.tryEmit(RunState.STOP)
|
||||||
}
|
}
|
||||||
runStateFlow.tryEmit(runState)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,8 +96,9 @@ object State {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun handleStartService() {
|
fun handleStartService() {
|
||||||
|
val appPlugin = flutterEngine?.plugin<AppPlugin>()
|
||||||
if (appPlugin != null) {
|
if (appPlugin != null) {
|
||||||
appPlugin?.requestNotificationsPermission {
|
appPlugin.requestNotificationsPermission {
|
||||||
startService()
|
startService()
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -159,10 +164,7 @@ object State {
|
|||||||
if (servicePlugin == null) {
|
if (servicePlugin == null) {
|
||||||
return@launch
|
return@launch
|
||||||
}
|
}
|
||||||
val options = servicePlugin?.handleGetVpnOptions()
|
val options = servicePlugin?.handleGetVpnOptions() ?: return@launch
|
||||||
if (options == null) {
|
|
||||||
return@launch
|
|
||||||
}
|
|
||||||
appPlugin?.prepare(options.enable) {
|
appPlugin?.prepare(options.enable) {
|
||||||
runTime = Service.startService(options, runTime)
|
runTime = Service.startService(options, runTime)
|
||||||
runStateFlow.tryEmit(RunState.START)
|
runStateFlow.tryEmit(RunState.START)
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="108dp"
|
android:width="108dp"
|
||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
android:viewportWidth="240"
|
android:viewportWidth="240"
|
||||||
android:viewportHeight="240">
|
android:viewportHeight="240">
|
||||||
<group android:scaleX="0.924"
|
<group android:scaleX="0.924"
|
||||||
android:scaleY="0.924"
|
android:scaleY="0.924"
|
||||||
android:translateX="9.12"
|
android:translateX="9.12"
|
||||||
android:translateY="9.12">
|
android:translateY="9.12">
|
||||||
<group android:scaleX="0.63461536"
|
<group android:scaleX="0.63461536"
|
||||||
android:scaleY="0.63461536"
|
android:scaleY="0.63461536"
|
||||||
android:translateX="45.96154"
|
android:translateX="45.96154"
|
||||||
android:translateY="43.846153">
|
android:translateY="43.846153">
|
||||||
<path
|
<path
|
||||||
android:pathData="M60.65,89.6L154.18,35.6A18,18 107.59,0 1,178.77 42.19L178.77,42.19A18,18 107.59,0 1,172.18 66.78L78.65,120.78A18,18 106.67,0 1,54.06 114.19L54.06,114.19A18,18 106.67,0 1,60.65 89.6z"
|
android:pathData="M60.65,89.6L154.18,35.6A18,18 107.59,0 1,178.77 42.19L178.77,42.19A18,18 107.59,0 1,172.18 66.78L78.65,120.78A18,18 106.67,0 1,54.06 114.19L54.06,114.19A18,18 106.67,0 1,60.65 89.6z"
|
||||||
android:fillColor="#6666FB"/>
|
android:fillColor="#6666FB"/>
|
||||||
<path
|
<path
|
||||||
android:pathData="M84.65,131.17L131.42,104.17A18,18 107.83,0 1,156 110.76L156,110.76A18,18 107.83,0 1,149.42 135.35L102.65,162.35A18,18 106.67,0 1,78.06 155.76L78.06,155.76A18,18 106.67,0 1,84.65 131.17z"
|
android:pathData="M84.65,131.17L131.42,104.17A18,18 107.83,0 1,156 110.76L156,110.76A18,18 107.83,0 1,149.42 135.35L102.65,162.35A18,18 106.67,0 1,78.06 155.76L78.06,155.76A18,18 106.67,0 1,84.65 131.17z"
|
||||||
android:fillColor="#336AB6"/>
|
android:fillColor="#336AB6"/>
|
||||||
<path
|
<path
|
||||||
android:pathData="M108.65,172.74L108.65,172.74A18,18 116.03,0 1,133.24 179.33L133.24,179.33A18,18 116.03,0 1,126.65 203.92L126.65,203.92A18,18 116.03,0 1,102.06 197.33L102.06,197.33A18,18 116.03,0 1,108.65 172.74z"
|
android:pathData="M108.65,172.74L108.65,172.74A18,18 116.03,0 1,133.24 179.33L133.24,179.33A18,18 116.03,0 1,126.65 203.92L126.65,203.92A18,18 116.03,0 1,102.06 197.33L102.06,197.33A18,18 116.03,0 1,108.65 172.74z"
|
||||||
android:fillColor="#5CA8E9"/>
|
android:fillColor="#5CA8E9"/>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -50,7 +50,11 @@ class CommonService : Service(), IBaseService,
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun start() {
|
override fun start() {
|
||||||
loader.load()
|
try {
|
||||||
|
loader.load()
|
||||||
|
} catch (_: Exception) {
|
||||||
|
stop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun stop() {
|
override fun stop() {
|
||||||
|
|||||||
@@ -234,9 +234,13 @@ class VpnService : SystemVpnService(), IBaseService,
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun start() {
|
override fun start() {
|
||||||
loader.load()
|
try {
|
||||||
State.options?.let {
|
loader.load()
|
||||||
handleStart(it)
|
State.options?.let {
|
||||||
|
handleStart(it)
|
||||||
|
}
|
||||||
|
} catch (_: Exception) {
|
||||||
|
stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -340,6 +340,8 @@
|
|||||||
"none": "none",
|
"none": "none",
|
||||||
"basicConfig": "Basic configuration",
|
"basicConfig": "Basic configuration",
|
||||||
"basicConfigDesc": "Modify the basic configuration globally",
|
"basicConfigDesc": "Modify the basic configuration globally",
|
||||||
|
"advancedConfig": "Advanced configuration",
|
||||||
|
"advancedConfigDesc": "Provide diverse configuration options",
|
||||||
"selectedCountTitle": "{count} items have been selected",
|
"selectedCountTitle": "{count} items have been selected",
|
||||||
"addRule": "Add rule",
|
"addRule": "Add rule",
|
||||||
"ruleName": "Rule name",
|
"ruleName": "Rule name",
|
||||||
@@ -390,7 +392,7 @@
|
|||||||
"existsTip": "Current {label} already exists",
|
"existsTip": "Current {label} already exists",
|
||||||
"deleteTip": "Are you sure you want to delete the current {label}?",
|
"deleteTip": "Are you sure you want to delete the current {label}?",
|
||||||
"deleteMultipTip": "Are you sure you want to delete the selected {label}?",
|
"deleteMultipTip": "Are you sure you want to delete the selected {label}?",
|
||||||
"nullTip": "No {label} at the moment",
|
"nullTip": "No {label} yet",
|
||||||
"script": "Script",
|
"script": "Script",
|
||||||
"color": "Color",
|
"color": "Color",
|
||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
@@ -434,5 +436,35 @@
|
|||||||
"crashlytics": "Crash Analysis",
|
"crashlytics": "Crash Analysis",
|
||||||
"crashlyticsTip": "When enabled, automatically uploads crash logs without sensitive information when the app crashes",
|
"crashlyticsTip": "When enabled, automatically uploads crash logs without sensitive information when the app crashes",
|
||||||
"appendSystemDns": "Append System DNS",
|
"appendSystemDns": "Append System DNS",
|
||||||
"appendSystemDnsTip": "Forcefully append system DNS to the configuration"
|
"appendSystemDnsTip": "Forcefully append system DNS to the configuration",
|
||||||
|
"editRule": "Edit rule",
|
||||||
|
"overrideMode": "Override mode",
|
||||||
|
"standardModeDesc": "Standard mode, override basic configuration, provide simple rule addition capability",
|
||||||
|
"scriptModeDesc": "Script mode, use external extension scripts, provide one-click override configuration capability",
|
||||||
|
"addedRules": "Added rules",
|
||||||
|
"controlGlobalAddedRules": "Control global added rules",
|
||||||
|
"overrideScript": "Override script",
|
||||||
|
"goToConfigureScript": "Go to configure script",
|
||||||
|
"editGlobalRules": "Edit global rules",
|
||||||
|
"externalFetch": "External fetch",
|
||||||
|
"confirmForceCrashCore": "Are you sure you want to force crash the core?",
|
||||||
|
"confirmClearAllData": "Are you sure you want to clear all data?",
|
||||||
|
"loading": "Loading...",
|
||||||
|
"loadTest": "Load test",
|
||||||
|
"yearsAgo": "{count, plural, =1{1 year ago} other{{count} years ago}}",
|
||||||
|
"monthsAgo": "{count, plural, =1{1 month ago} other{{count} months ago}}",
|
||||||
|
"daysAgo": "{count, plural, =1{1 day ago} other{{count} days ago}}",
|
||||||
|
"hoursAgo": "{count, plural, =1{1 hour ago} other{{count} hours ago}}",
|
||||||
|
"minutesAgo": "{count, plural, =1{1 minute ago} other{{count} minutes ago}}",
|
||||||
|
"justNow": "Just now",
|
||||||
|
"noLongerRemind": "Don't remind again",
|
||||||
|
"accessControlSettings": "Access Control Settings",
|
||||||
|
"turnOn": "Turn On",
|
||||||
|
"turnOff": "Turn Off",
|
||||||
|
"coreConfigChangeDetected": "Core configuration change detected",
|
||||||
|
"reload": "Reload",
|
||||||
|
"vpnConfigChangeDetected": "VPN configuration change detected",
|
||||||
|
"restart": "Restart",
|
||||||
|
"speedStatistics": "Speed statistics",
|
||||||
|
"resetPageChangesTip": "The current page has changes. Are you sure you want to reset?"
|
||||||
}
|
}
|
||||||
@@ -340,6 +340,8 @@
|
|||||||
"none": "なし",
|
"none": "なし",
|
||||||
"basicConfig": "基本設定",
|
"basicConfig": "基本設定",
|
||||||
"basicConfigDesc": "基本設定をグローバルに変更",
|
"basicConfigDesc": "基本設定をグローバルに変更",
|
||||||
|
"advancedConfig": "高度な設定",
|
||||||
|
"advancedConfigDesc": "多様な設定を提供",
|
||||||
"selectedCountTitle": "{count} 項目が選択されています",
|
"selectedCountTitle": "{count} 項目が選択されています",
|
||||||
"addRule": "ルールを追加",
|
"addRule": "ルールを追加",
|
||||||
"ruleName": "ルール名",
|
"ruleName": "ルール名",
|
||||||
@@ -391,7 +393,7 @@
|
|||||||
"existsTip": "現在の{label}は既に存在しています",
|
"existsTip": "現在の{label}は既に存在しています",
|
||||||
"deleteTip": "現在の{label}を削除してもよろしいですか?",
|
"deleteTip": "現在の{label}を削除してもよろしいですか?",
|
||||||
"deleteMultipTip": "選択された{label}を削除してもよろしいですか?",
|
"deleteMultipTip": "選択された{label}を削除してもよろしいですか?",
|
||||||
"nullTip": "現在{label}はありません",
|
"nullTip": "まだ{label}はありません",
|
||||||
"script": "スクリプト",
|
"script": "スクリプト",
|
||||||
"color": "カラー",
|
"color": "カラー",
|
||||||
"rename": "リネーム",
|
"rename": "リネーム",
|
||||||
@@ -435,5 +437,35 @@
|
|||||||
"crashlytics": "クラッシュ分析",
|
"crashlytics": "クラッシュ分析",
|
||||||
"crashlyticsTip": "有効にすると、アプリがクラッシュした際に機密情報を含まないクラッシュログを自動的にアップロードします",
|
"crashlyticsTip": "有効にすると、アプリがクラッシュした際に機密情報を含まないクラッシュログを自動的にアップロードします",
|
||||||
"appendSystemDns": "システムDNSを追加",
|
"appendSystemDns": "システムDNSを追加",
|
||||||
"appendSystemDnsTip": "設定にシステムDNSを強制的に追加します"
|
"appendSystemDnsTip": "設定にシステムDNSを強制的に追加します",
|
||||||
|
"editRule": "ルールを編集",
|
||||||
|
"overrideMode": "上書きモード",
|
||||||
|
"standardModeDesc": "標準モード、基本設定を上書きし、シンプルなルール追加機能を提供",
|
||||||
|
"scriptModeDesc": "スクリプトモード、外部拡張スクリプトを使用し、ワンクリックで設定を上書きする機能を提供",
|
||||||
|
"addedRules": "追加ルール",
|
||||||
|
"controlGlobalAddedRules": "グローバル追加ルールを制御",
|
||||||
|
"overrideScript": "上書きスクリプト",
|
||||||
|
"goToConfigureScript": "スクリプト設定に移動",
|
||||||
|
"editGlobalRules": "グローバルルールを編集",
|
||||||
|
"externalFetch": "外部取得",
|
||||||
|
"confirmForceCrashCore": "コアを強制的にクラッシュさせてもよろしいですか?",
|
||||||
|
"confirmClearAllData": "すべてのデータをクリアしてもよろしいですか?",
|
||||||
|
"loading": "読み込み中...",
|
||||||
|
"loadTest": "読み込みテスト",
|
||||||
|
"yearsAgo": "{count}年前",
|
||||||
|
"monthsAgo": "{count}ヶ月前",
|
||||||
|
"daysAgo": "{count}日前",
|
||||||
|
"hoursAgo": "{count}時間前",
|
||||||
|
"minutesAgo": "{count}分前",
|
||||||
|
"justNow": "たった今",
|
||||||
|
"noLongerRemind": "今後表示しない",
|
||||||
|
"accessControlSettings": "アクセス制御設定",
|
||||||
|
"turnOn": "オン",
|
||||||
|
"turnOff": "オフ",
|
||||||
|
"coreConfigChangeDetected": "コア設定の変更が検出されました",
|
||||||
|
"reload": "リロード",
|
||||||
|
"vpnConfigChangeDetected": "VPN設定の変更が検出されました",
|
||||||
|
"restart": "再起動",
|
||||||
|
"speedStatistics": "速度統計",
|
||||||
|
"resetPageChangesTip": "現在のページに変更があります。リセットしてもよろしいですか?"
|
||||||
}
|
}
|
||||||
@@ -340,6 +340,8 @@
|
|||||||
"none": "Нет",
|
"none": "Нет",
|
||||||
"basicConfig": "Базовая конфигурация",
|
"basicConfig": "Базовая конфигурация",
|
||||||
"basicConfigDesc": "Глобальное изменение базовых настроек",
|
"basicConfigDesc": "Глобальное изменение базовых настроек",
|
||||||
|
"advancedConfig": "Расширенная конфигурация",
|
||||||
|
"advancedConfigDesc": "Предоставляет разнообразные варианты конфигурации",
|
||||||
"selectedCountTitle": "Выбрано {count} элементов",
|
"selectedCountTitle": "Выбрано {count} элементов",
|
||||||
"addRule": "Добавить правило",
|
"addRule": "Добавить правило",
|
||||||
"ruleName": "Название правила",
|
"ruleName": "Название правила",
|
||||||
@@ -391,7 +393,7 @@
|
|||||||
"existsTip": "Текущий {label} уже существует",
|
"existsTip": "Текущий {label} уже существует",
|
||||||
"deleteTip": "Вы уверены, что хотите удалить текущий {label}?",
|
"deleteTip": "Вы уверены, что хотите удалить текущий {label}?",
|
||||||
"deleteMultipTip": "Вы уверены, что хотите удалить выбранные {label}?",
|
"deleteMultipTip": "Вы уверены, что хотите удалить выбранные {label}?",
|
||||||
"nullTip": "Сейчас {label} нет",
|
"nullTip": "{label} пока отсутствуют",
|
||||||
"script": "Скрипт",
|
"script": "Скрипт",
|
||||||
"color": "Цвет",
|
"color": "Цвет",
|
||||||
"rename": "Переименовать",
|
"rename": "Переименовать",
|
||||||
@@ -435,5 +437,35 @@
|
|||||||
"crashlytics": "Анализ сбоев",
|
"crashlytics": "Анализ сбоев",
|
||||||
"crashlyticsTip": "При включении автоматически загружает журналы сбоев без конфиденциальной информации, когда приложение выходит из строя",
|
"crashlyticsTip": "При включении автоматически загружает журналы сбоев без конфиденциальной информации, когда приложение выходит из строя",
|
||||||
"appendSystemDns": "Добавить системный DNS",
|
"appendSystemDns": "Добавить системный DNS",
|
||||||
"appendSystemDnsTip": "Принудительно добавить системный DNS к конфигурации"
|
"appendSystemDnsTip": "Принудительно добавить системный DNS к конфигурации",
|
||||||
|
"editRule": "Редактировать правило",
|
||||||
|
"overrideMode": "Режим переопределения",
|
||||||
|
"standardModeDesc": "Стандартный режим, переопределение базовой конфигурации, предоставление возможности простого добавления правил",
|
||||||
|
"scriptModeDesc": "Режим скрипта, использование внешних расширяющих скриптов, предоставление возможности переопределения конфигурации одним кликом",
|
||||||
|
"addedRules": "Добавленные правила",
|
||||||
|
"controlGlobalAddedRules": "Управление глобальными добавленными правилами",
|
||||||
|
"overrideScript": "Скрипт переопределения",
|
||||||
|
"goToConfigureScript": "Перейти к настройке скрипта",
|
||||||
|
"editGlobalRules": "Редактировать глобальные правила",
|
||||||
|
"externalFetch": "Внешнее получение",
|
||||||
|
"confirmForceCrashCore": "Вы уверены, что хотите принудительно аварийно завершить работу ядра?",
|
||||||
|
"confirmClearAllData": "Вы уверены, что хотите очистить все данные?",
|
||||||
|
"loading": "Загрузка...",
|
||||||
|
"loadTest": "Тест загрузки",
|
||||||
|
"yearsAgo": "{count, plural, one{{count} год назад} few{{count} года назад} many{{count} лет назад} other{{count} года назад}}",
|
||||||
|
"monthsAgo": "{count, plural, one{{count} месяц назад} few{{count} месяца назад} many{{count} месяцев назад} other{{count} месяца назад}}",
|
||||||
|
"daysAgo": "{count, plural, one{{count} день назад} few{{count} дня назад} many{{count} дней назад} other{{count} дня назад}}",
|
||||||
|
"hoursAgo": "{count, plural, one{{count} час назад} few{{count} часа назад} many{{count} часов назад} other{{count} часа назад}}",
|
||||||
|
"minutesAgo": "{count, plural, one{{count} минута назад} few{{count} минуты назад} many{{count} минут назад} other{{count} минуты назад}}",
|
||||||
|
"justNow": "Только что",
|
||||||
|
"noLongerRemind": "Больше не напоминать",
|
||||||
|
"accessControlSettings": "Настройки контроля доступа",
|
||||||
|
"turnOn": "Включить",
|
||||||
|
"turnOff": "Выключить",
|
||||||
|
"coreConfigChangeDetected": "Обнаружено изменение конфигурации ядра",
|
||||||
|
"reload": "Перезагрузить",
|
||||||
|
"vpnConfigChangeDetected": "Обнаружено изменение конфигурации VPN",
|
||||||
|
"restart": "Перезапустить",
|
||||||
|
"speedStatistics": "Статистика скорости",
|
||||||
|
"resetPageChangesTip": "На текущей странице есть изменения. Вы уверены, что хотите сбросить?"
|
||||||
}
|
}
|
||||||
@@ -340,6 +340,8 @@
|
|||||||
"none": "无",
|
"none": "无",
|
||||||
"basicConfig": "基本配置",
|
"basicConfig": "基本配置",
|
||||||
"basicConfigDesc": "全局修改基本配置",
|
"basicConfigDesc": "全局修改基本配置",
|
||||||
|
"advancedConfig": "进阶配置",
|
||||||
|
"advancedConfigDesc": "提供多样化配置",
|
||||||
"selectedCountTitle": "已选择 {count} 项",
|
"selectedCountTitle": "已选择 {count} 项",
|
||||||
"addRule": "添加规则",
|
"addRule": "添加规则",
|
||||||
"ruleName": "规则名称",
|
"ruleName": "规则名称",
|
||||||
@@ -435,5 +437,35 @@
|
|||||||
"crashlytics": "崩溃分析",
|
"crashlytics": "崩溃分析",
|
||||||
"crashlyticsTip": "开启后,应用崩溃时自动上传不包含敏感信息的崩溃日志",
|
"crashlyticsTip": "开启后,应用崩溃时自动上传不包含敏感信息的崩溃日志",
|
||||||
"appendSystemDns": "追加系统DNS",
|
"appendSystemDns": "追加系统DNS",
|
||||||
"appendSystemDnsTip": "强制为配置附加系统DNS"
|
"appendSystemDnsTip": "强制为配置附加系统DNS",
|
||||||
|
"editRule": "编辑规则",
|
||||||
|
"overrideMode": "覆写模式",
|
||||||
|
"standardModeDesc": "标准模式,覆写基本配置,提供简单追加规则能力",
|
||||||
|
"scriptModeDesc": "脚本模式,使用外部扩展脚本,提供一键覆写配置的能力",
|
||||||
|
"addedRules": "附加规则",
|
||||||
|
"controlGlobalAddedRules": "控制全局附加规则",
|
||||||
|
"overrideScript": "覆写脚本",
|
||||||
|
"goToConfigureScript": "前往配置脚本",
|
||||||
|
"editGlobalRules": "编辑全局规则",
|
||||||
|
"externalFetch": "外部获取",
|
||||||
|
"confirmForceCrashCore": "确定要强制崩溃核心?",
|
||||||
|
"confirmClearAllData": "确定要清除所有数据?",
|
||||||
|
"loading": "加载中...",
|
||||||
|
"loadTest": "加载测试",
|
||||||
|
"yearsAgo": "{count} 年前",
|
||||||
|
"monthsAgo": "{count} 个月前",
|
||||||
|
"daysAgo": "{count} 天前",
|
||||||
|
"hoursAgo": "{count} 小时前",
|
||||||
|
"minutesAgo": "{count} 分钟前",
|
||||||
|
"justNow": "刚刚",
|
||||||
|
"noLongerRemind": "不再提示",
|
||||||
|
"accessControlSettings": "访问控制设置",
|
||||||
|
"turnOn": "开启",
|
||||||
|
"turnOff": "关闭",
|
||||||
|
"coreConfigChangeDetected": "检测到核心配置更改",
|
||||||
|
"reload": "重载",
|
||||||
|
"vpnConfigChangeDetected": "检测到VPN相关配置改动",
|
||||||
|
"restart": "重启",
|
||||||
|
"speedStatistics": "网速统计",
|
||||||
|
"resetPageChangesTip": "当前页面存在更改,确定重置吗?"
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
23
assets/images/empty/connection.svg
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="75" y="50" width="150" height="180" rx="24" fill="#FDF7FF" stroke="#E8DEF8" stroke-width="2"/>
|
||||||
|
|
||||||
|
<rect x="95" y="90" width="36" height="12" rx="4" fill="#E8DEF8"/>
|
||||||
|
<rect x="140" y="90" width="65" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<path d="M95 118H205" stroke="#E8DEF8" stroke-width="2" stroke-dasharray="4 4"/>
|
||||||
|
|
||||||
|
<rect x="95" y="138" width="40" height="12" rx="6" fill="#E8DEF8" opacity="0.7"/>
|
||||||
|
<rect x="145" y="138" width="50" height="12" rx="6" fill="#E8DEF8" opacity="0.5"/>
|
||||||
|
|
||||||
|
<rect x="95" y="162" width="55" height="12" rx="6" fill="#E8DEF8" opacity="0.7"/>
|
||||||
|
<rect x="160" y="162" width="30" height="12" rx="6" fill="#E8DEF8" opacity="0.5"/>
|
||||||
|
|
||||||
|
<g transform="translate(210, 210)">
|
||||||
|
<circle cx="0" cy="0" r="38" fill="#6750A4" stroke="#FDF7FF" stroke-width="6"/>
|
||||||
|
|
||||||
|
<path d="M-10 16V-16M-10 -16L-18 -8M-10 -16L-2 -8" stroke="#FDF7FF" stroke-width="5" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"/>
|
||||||
|
<path d="M10 -16V16M10 16L2 8M10 16L18 8" stroke="#FDF7FF" stroke-width="5" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
9
assets/images/empty/data.svg
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="75" y="50" width="150" height="180" rx="24" fill="#FDF7FF" stroke="#E8DEF8" stroke-width="2"/>
|
||||||
|
<rect x="100" y="90" width="100" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
<rect x="100" y="115" width="70" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
<rect x="100" y="140" width="80" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
<rect x="155" y="170" width="80" height="60" rx="12" fill="#6750A4"/>
|
||||||
|
<rect x="150" y="165" width="90" height="18" rx="6" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"/>
|
||||||
|
<rect x="185" y="200" width="20" height="6" rx="3" fill="#FDF7FF" opacity="0.8"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 700 B |
25
assets/images/empty/log.svg
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M90 200C90 180 100 165 150 165C200 165 210 180 210 200V220C210 231.046 201.046 240 190 240H110C98.9543 240 90 231.046 90 220V200Z"
|
||||||
|
fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<rect x="75" y="85" width="150" height="100" rx="30" fill="#6750A4"/>
|
||||||
|
|
||||||
|
<rect x="85" y="95" width="130" height="80" rx="22" fill="#6750A4" stroke="#7D66B5" stroke-width="2"/>
|
||||||
|
|
||||||
|
<path d="M110 135 C110 142 118 148 128 148 C138 148 146 142 146 135" stroke="#FDF7FF" stroke-width="4"
|
||||||
|
stroke-linecap="round"/>
|
||||||
|
<path d="M154 135 C154 142 162 148 172 148 C182 148 190 142 190 135" stroke="#FDF7FF" stroke-width="4"
|
||||||
|
stroke-linecap="round"/>
|
||||||
|
<circle cx="150" cy="160" r="4" fill="#E8DEF8" opacity="0.5"/>
|
||||||
|
|
||||||
|
<path d="M150 85 V 65" stroke="#6750A4" stroke-width="4" stroke-linecap="round"/>
|
||||||
|
<circle cx="150" cy="60" r="8" fill="#6750A4"/>
|
||||||
|
<circle cx="150" cy="60" r="3" fill="#FDF7FF"/>
|
||||||
|
|
||||||
|
<path d="M220 70 L235 70 L220 85 H235" stroke="#6750A4" stroke-width="3" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"/>
|
||||||
|
<path d="M245 40 L255 40 L245 50 H255" stroke="#E8DEF8" stroke-width="2" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"/>
|
||||||
|
|
||||||
|
<path d="M90 185 H210" stroke="#000" stroke-width="4" stroke-opacity="0.1" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
37
assets/images/empty/profile.svg
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
|
||||||
|
<path d="M60 94V84C60 72.9543 68.9543 64 80 64H130C141.046 64 150 72.9543 150 84V94H220C231.046 94 240 102.954 240 114V210C240 221.046 231.046 230 220 230H80C68.9543 230 60 221.046 60 210V94Z"
|
||||||
|
fill="#FDF7FF" stroke="#E8DEF8" stroke-width="2"/>
|
||||||
|
|
||||||
|
|
||||||
|
<rect x="90" y="124" width="60" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
|
||||||
|
<rect x="90" y="154" width="50" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<rect x="90" y="184" width="40" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
<rect x="180" y="184" width="30" height="12" rx="6" fill="#E8DEF8" opacity="0.6"/>
|
||||||
|
<circle cx="186" cy="190" r="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<g transform="translate(210, 210)">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M0 -32 C-17.67 -32 -32 -17.67 -32 0 C-32 17.67 -17.67 32 0 32 C17.67 32 32 17.67 32 0 C32 -17.67 17.67 -32 0 -32ZM0 -8 C-4.42 -8 -8 -4.42 -8 0 C-8 4.42 -4.42 8 0 8 C4.42 8 8 4.42 8 0 C8 -4.42 4.42 -8 0 -8Z"
|
||||||
|
fill="#6750A4" stroke="#FDF7FF" stroke-width="6"/>
|
||||||
|
|
||||||
|
<rect x="-5" y="-38" width="10" height="12" rx="3" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"/>
|
||||||
|
<rect x="-5" y="26" width="10" height="12" rx="3" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"/>
|
||||||
|
<rect x="-38" y="-5" width="12" height="10" rx="3" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"/>
|
||||||
|
<rect x="26" y="-5" width="12" height="10" rx="3" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"/>
|
||||||
|
<rect x="-5" y="-38" width="10" height="12" rx="3" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"
|
||||||
|
transform="rotate(45)"/>
|
||||||
|
<rect x="-5" y="26" width="10" height="12" rx="3" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"
|
||||||
|
transform="rotate(45)"/>
|
||||||
|
<rect x="-38" y="-5" width="12" height="10" rx="3" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"
|
||||||
|
transform="rotate(45)"/>
|
||||||
|
<rect x="26" y="-5" width="12" height="10" rx="3" fill="#6750A4" stroke="#FDF7FF" stroke-width="2"
|
||||||
|
transform="rotate(45)"/>
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="22" fill="#6750A4"/>
|
||||||
|
<circle cx="0" cy="0" r="8" fill="#FDF7FF" opacity="0.8"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.2 KiB |
18
assets/images/empty/proxy.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="75" y="50" width="150" height="180" rx="24" fill="#FDF7FF" stroke="#E8DEF8" stroke-width="2"/>
|
||||||
|
<rect x="95" y="90" width="110" height="16" rx="4" fill="#E8DEF8"/>
|
||||||
|
<circle cx="105" cy="98" r="3" fill="#FDF7FF"/>
|
||||||
|
<circle cx="115" cy="98" r="3" fill="#FDF7FF"/>
|
||||||
|
<rect x="95" y="120" width="110" height="16" rx="4" fill="#E8DEF8"/>
|
||||||
|
<circle cx="105" cy="128" r="3" fill="#FDF7FF"/>
|
||||||
|
<circle cx="115" cy="128" r="3" fill="#FDF7FF"/>
|
||||||
|
<rect x="95" y="150" width="80" height="16" rx="4" fill="#E8DEF8"/>
|
||||||
|
<circle cx="105" cy="158" r="3" fill="#FDF7FF"/>
|
||||||
|
<circle cx="115" cy="158" r="3" fill="#FDF7FF"/>
|
||||||
|
<circle cx="195" cy="195" r="30" fill="#6750A4"/>
|
||||||
|
<rect x="180" y="193" width="30" height="4" rx="2" fill="#FDF7FF" transform="rotate(45 195 195)"/>
|
||||||
|
<circle cx="183" cy="183" r="4" fill="#FDF7FF"/>
|
||||||
|
<circle cx="207" cy="207" r="4" fill="#FDF7FF"/>
|
||||||
|
<path d="M175 158 H190 V165" stroke="#E8DEF8" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
31
assets/images/empty/rule.svg
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
|
||||||
|
<rect x="75" y="50" width="150" height="180" rx="24" fill="#FDF7FF" stroke="#E8DEF8" stroke-width="2"/>
|
||||||
|
|
||||||
|
|
||||||
|
<rect x="95" y="90" width="80" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<rect x="185" y="90" width="25" height="12" rx="6" fill="#E8DEF8" opacity="0.7"/>
|
||||||
|
|
||||||
|
|
||||||
|
<rect x="95" y="125" width="60" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
<rect x="165" y="125" width="45" height="12" rx="6" fill="#E8DEF8" opacity="0.7"/>
|
||||||
|
|
||||||
|
|
||||||
|
<rect x="95" y="160" width="70" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
<rect x="175" y="160" width="35" height="12" rx="6" fill="#E8DEF8" opacity="0.7"/>
|
||||||
|
|
||||||
|
|
||||||
|
<g transform="translate(210, 210)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="#6750A4" stroke="#FDF7FF" stroke-width="6"/>
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="24" stroke="#FDF7FF" stroke-width="3"/>
|
||||||
|
|
||||||
|
<path d="M-24 0C-24 0 -12 8 0 8C12 8 24 0 24 0" stroke="#FDF7FF" stroke-width="3" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"/>
|
||||||
|
|
||||||
|
<ellipse cx="0" cy="0" rx="10" ry="24" stroke="#FDF7FF" stroke-width="3"/>
|
||||||
|
|
||||||
|
<circle cx="14" cy="-12" r="3" fill="#FDF7FF"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
19
assets/images/empty/script.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="75" y="50" width="150" height="180" rx="24" fill="#FDF7FF" stroke="#E8DEF8" stroke-width="2"/>
|
||||||
|
|
||||||
|
<rect x="100" y="90" width="30" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
<rect x="136" y="90" width="50" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<rect x="120" y="120" width="80" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<rect x="120" y="150" width="50" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<rect x="100" y="180" width="20" height="12" rx="6" fill="#E8DEF8"/>
|
||||||
|
|
||||||
|
<g transform="translate(165, 160)">
|
||||||
|
<rect x="0" y="0" width="80" height="80" rx="20" fill="#6750A4" stroke="#FDF7FF" stroke-width="4"/>
|
||||||
|
<path d="M28 30L18 40L28 50" stroke="#FDF7FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M52 30L62 40L52 50" stroke="#FDF7FF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M46 26L34 54" stroke="#FDF7FF" stroke-width="4" stroke-linecap="round" opacity="0.8"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/images/icon/status_1.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
assets/images/icon/status_1.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
assets/images/icon/status_2.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
assets/images/icon/status_2.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
assets/images/icon/status_3.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
assets/images/icon/status_3.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
@@ -17,6 +17,7 @@ import (
|
|||||||
"github.com/metacubex/mihomo/constant/features"
|
"github.com/metacubex/mihomo/constant/features"
|
||||||
cp "github.com/metacubex/mihomo/constant/provider"
|
cp "github.com/metacubex/mihomo/constant/provider"
|
||||||
"github.com/metacubex/mihomo/hub"
|
"github.com/metacubex/mihomo/hub"
|
||||||
|
"github.com/metacubex/mihomo/hub/executor"
|
||||||
"github.com/metacubex/mihomo/hub/route"
|
"github.com/metacubex/mihomo/hub/route"
|
||||||
"github.com/metacubex/mihomo/listener"
|
"github.com/metacubex/mihomo/listener"
|
||||||
"github.com/metacubex/mihomo/log"
|
"github.com/metacubex/mihomo/log"
|
||||||
@@ -263,7 +264,7 @@ func setupConfig(params *SetupParams) error {
|
|||||||
defer runLock.Unlock()
|
defer runLock.Unlock()
|
||||||
var err error
|
var err error
|
||||||
constant.DefaultTestURL = params.TestURL
|
constant.DefaultTestURL = params.TestURL
|
||||||
currentConfig, err = parseWithPath(filepath.Join(constant.Path.HomeDir(), "config.json"))
|
currentConfig, err = executor.ParseWithPath(filepath.Join(constant.Path.HomeDir(), "config.yaml"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
currentConfig, _ = config.ParseRawConfig(config.DefaultRawConfig())
|
currentConfig, _ = config.ParseRawConfig(config.DefaultRawConfig())
|
||||||
}
|
}
|
||||||
|
|||||||
25
core/go.mod
@@ -18,8 +18,8 @@ require (
|
|||||||
github.com/buger/jsonparser v1.1.1 // indirect
|
github.com/buger/jsonparser v1.1.1 // indirect
|
||||||
github.com/coreos/go-iptables v0.8.0 // indirect
|
github.com/coreos/go-iptables v0.8.0 // indirect
|
||||||
github.com/dlclark/regexp2 v1.11.5 // indirect
|
github.com/dlclark/regexp2 v1.11.5 // indirect
|
||||||
github.com/ebitengine/purego v0.9.0 // indirect
|
github.com/ebitengine/purego v0.9.1 // indirect
|
||||||
github.com/enfein/mieru/v3 v3.20.0 // indirect
|
github.com/enfein/mieru/v3 v3.22.1 // indirect
|
||||||
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 // indirect
|
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 // indirect
|
||||||
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 // indirect
|
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 // indirect
|
||||||
github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 // indirect
|
github.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 // indirect
|
||||||
@@ -33,7 +33,7 @@ require (
|
|||||||
github.com/gobwas/httphead v0.1.0 // indirect
|
github.com/gobwas/httphead v0.1.0 // indirect
|
||||||
github.com/gobwas/pool v0.2.1 // indirect
|
github.com/gobwas/pool v0.2.1 // indirect
|
||||||
github.com/gobwas/ws v1.4.0 // indirect
|
github.com/gobwas/ws v1.4.0 // indirect
|
||||||
github.com/gofrs/uuid/v5 v5.3.2 // indirect
|
github.com/gofrs/uuid/v5 v5.4.0 // indirect
|
||||||
github.com/golang/snappy v1.0.0 // indirect
|
github.com/golang/snappy v1.0.0 // indirect
|
||||||
github.com/google/btree v1.1.3 // indirect
|
github.com/google/btree v1.1.3 // indirect
|
||||||
github.com/google/go-cmp v0.6.0 // indirect
|
github.com/google/go-cmp v0.6.0 // indirect
|
||||||
@@ -46,32 +46,32 @@ require (
|
|||||||
github.com/mailru/easyjson v0.7.7 // indirect
|
github.com/mailru/easyjson v0.7.7 // indirect
|
||||||
github.com/mdlayher/netlink v1.7.2 // indirect
|
github.com/mdlayher/netlink v1.7.2 // indirect
|
||||||
github.com/mdlayher/socket v0.4.1 // indirect
|
github.com/mdlayher/socket v0.4.1 // indirect
|
||||||
github.com/metacubex/amneziawg-go v0.0.0-20250902133113-a7f637c14281 // indirect
|
github.com/metacubex/amneziawg-go v0.0.0-20251104174305-5a0e9f7e361d // indirect
|
||||||
github.com/metacubex/ascon v0.1.0 // indirect
|
github.com/metacubex/ascon v0.1.0 // indirect
|
||||||
github.com/metacubex/bart v0.24.0 // indirect
|
github.com/metacubex/bart v0.26.0 // indirect
|
||||||
github.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b // indirect
|
github.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b // indirect
|
||||||
github.com/metacubex/blake3 v0.1.0 // indirect
|
github.com/metacubex/blake3 v0.1.0 // indirect
|
||||||
github.com/metacubex/chacha v0.1.5 // indirect
|
github.com/metacubex/chacha v0.1.5 // indirect
|
||||||
github.com/metacubex/fswatch v0.1.1 // indirect
|
github.com/metacubex/fswatch v0.1.1 // indirect
|
||||||
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 // indirect
|
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 // indirect
|
||||||
github.com/metacubex/gvisor v0.0.0-20250919004547-6122b699a301 // indirect
|
github.com/metacubex/gvisor v0.0.0-20250919004547-6122b699a301 // indirect
|
||||||
github.com/metacubex/kcp-go v0.0.0-20250923001605-1ba6f691c45b // indirect
|
github.com/metacubex/kcp-go v0.0.0-20251105084629-8c93f4bf37be // indirect
|
||||||
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 // indirect
|
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 // indirect
|
||||||
github.com/metacubex/quic-go v0.54.1-0.20250730114134-a1ae705fe295 // indirect
|
github.com/metacubex/quic-go v0.55.1-0.20251024060151-bd465f127128 // indirect
|
||||||
github.com/metacubex/randv2 v0.2.0 // indirect
|
github.com/metacubex/randv2 v0.2.0 // indirect
|
||||||
github.com/metacubex/restls-client-go v0.1.7 // indirect
|
github.com/metacubex/restls-client-go v0.1.7 // indirect
|
||||||
github.com/metacubex/sing v0.5.6 // indirect
|
github.com/metacubex/sing v0.5.6 // indirect
|
||||||
github.com/metacubex/sing-mux v0.3.4 // indirect
|
github.com/metacubex/sing-mux v0.3.4 // indirect
|
||||||
github.com/metacubex/sing-quic v0.0.0-20250909002258-06122df8f231 // indirect
|
github.com/metacubex/sing-quic v0.0.0-20251004051927-c45ee18473bb // indirect
|
||||||
github.com/metacubex/sing-shadowsocks v0.2.12 // indirect
|
github.com/metacubex/sing-shadowsocks v0.2.12 // indirect
|
||||||
github.com/metacubex/sing-shadowsocks2 v0.2.7 // indirect
|
github.com/metacubex/sing-shadowsocks2 v0.2.7 // indirect
|
||||||
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 // indirect
|
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 // indirect
|
||||||
github.com/metacubex/sing-tun v0.4.8 // indirect
|
github.com/metacubex/sing-tun v0.4.9 // indirect
|
||||||
github.com/metacubex/sing-vmess v0.2.4 // indirect
|
github.com/metacubex/sing-vmess v0.2.4 // indirect
|
||||||
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f // indirect
|
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f // indirect
|
||||||
github.com/metacubex/smux v0.0.0-20250922175018-15c9a6a78719 // indirect
|
github.com/metacubex/smux v0.0.0-20250922175018-15c9a6a78719 // indirect
|
||||||
github.com/metacubex/tfo-go v0.0.0-20250921095601-b102db4216c0 // indirect
|
github.com/metacubex/tfo-go v0.0.0-20251024101424-368b42b59148 // indirect
|
||||||
github.com/metacubex/utls v1.8.1 // indirect
|
github.com/metacubex/utls v1.8.3 // indirect
|
||||||
github.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f // indirect
|
github.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f // indirect
|
||||||
github.com/metacubex/yamux v0.0.0-20250918083631-dd5f17c0be49 // indirect
|
github.com/metacubex/yamux v0.0.0-20250918083631-dd5f17c0be49 // indirect
|
||||||
github.com/miekg/dns v1.1.63 // indirect
|
github.com/miekg/dns v1.1.63 // indirect
|
||||||
@@ -84,7 +84,7 @@ require (
|
|||||||
github.com/quic-go/qpack v0.4.0 // indirect
|
github.com/quic-go/qpack v0.4.0 // indirect
|
||||||
github.com/sagernet/cors v1.2.1 // indirect
|
github.com/sagernet/cors v1.2.1 // indirect
|
||||||
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a // indirect
|
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a // indirect
|
||||||
github.com/samber/lo v1.51.0 // indirect
|
github.com/samber/lo v1.52.0 // indirect
|
||||||
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b // indirect
|
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b // indirect
|
||||||
github.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c // indirect
|
github.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c // indirect
|
||||||
github.com/sina-ghaderi/rabbitio v0.0.0-20220730151941-9ce26f4f872e // indirect
|
github.com/sina-ghaderi/rabbitio v0.0.0-20220730151941-9ce26f4f872e // indirect
|
||||||
@@ -96,7 +96,6 @@ require (
|
|||||||
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
|
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
|
||||||
gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7 // indirect
|
gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7 // indirect
|
||||||
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
|
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
|
||||||
go.uber.org/mock v0.4.0 // indirect
|
|
||||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
|
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
|
||||||
golang.org/x/crypto v0.33.0 // indirect
|
golang.org/x/crypto v0.33.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
|
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
|
||||||
|
|||||||
49
core/go.sum
@@ -22,10 +22,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
|
|||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
|
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
|
||||||
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||||
github.com/ebitengine/purego v0.9.0 h1:mh0zpKBIXDceC63hpvPuGLiJ8ZAa3DfrFTudmfi8A4k=
|
github.com/ebitengine/purego v0.9.1 h1:a/k2f2HQU3Pi399RPW1MOaZyhKJL9w/xFpKAg4q1s0A=
|
||||||
github.com/ebitengine/purego v0.9.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
github.com/ebitengine/purego v0.9.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||||
github.com/enfein/mieru/v3 v3.20.0 h1:1ob7pCIVSH5FYFAfYvim8isLW1vBOS4cFOUF9exJS38=
|
github.com/enfein/mieru/v3 v3.22.1 h1:/XGYYXpEhEJlxosmtbpEJkhtRLHB8IToG7LB8kU2ZDY=
|
||||||
github.com/enfein/mieru/v3 v3.20.0/go.mod h1:zJBUCsi5rxyvHM8fjFf+GLaEl4OEjjBXr1s5F6Qd3hM=
|
github.com/enfein/mieru/v3 v3.22.1/go.mod h1:zJBUCsi5rxyvHM8fjFf+GLaEl4OEjjBXr1s5F6Qd3hM=
|
||||||
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 h1:kXYqH/sL8dS/FdoFjr12ePjnLPorPo2FsnrHNuXSDyo=
|
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 h1:kXYqH/sL8dS/FdoFjr12ePjnLPorPo2FsnrHNuXSDyo=
|
||||||
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I=
|
github.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I=
|
||||||
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g=
|
github.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g=
|
||||||
@@ -54,8 +54,8 @@ github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
|
|||||||
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||||
github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
|
github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
|
||||||
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
|
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
|
||||||
github.com/gofrs/uuid/v5 v5.3.2 h1:2jfO8j3XgSwlz/wHqemAEugfnTlikAYHhnqQ8Xh4fE0=
|
github.com/gofrs/uuid/v5 v5.4.0 h1:EfbpCTjqMuGyq5ZJwxqzn3Cbr2d0rUZU7v5ycAk/e/0=
|
||||||
github.com/gofrs/uuid/v5 v5.3.2/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
github.com/gofrs/uuid/v5 v5.4.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
||||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||||
github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
|
github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
|
||||||
@@ -86,12 +86,12 @@ github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/
|
|||||||
github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=
|
github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=
|
||||||
github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=
|
github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=
|
||||||
github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA=
|
github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA=
|
||||||
github.com/metacubex/amneziawg-go v0.0.0-20250902133113-a7f637c14281 h1:09EM0sOLb2kfL0KETGhHujsBLB5iy5U/2yHRHsxf/pI=
|
github.com/metacubex/amneziawg-go v0.0.0-20251104174305-5a0e9f7e361d h1:vAJ0ZT4aO803F1uw2roIA9yH7Sxzox34tVVyye1bz6c=
|
||||||
github.com/metacubex/amneziawg-go v0.0.0-20250902133113-a7f637c14281/go.mod h1:MsM/5czONyXMJ3PRr5DbQ4O/BxzAnJWOIcJdLzW6qHY=
|
github.com/metacubex/amneziawg-go v0.0.0-20251104174305-5a0e9f7e361d/go.mod h1:MsM/5czONyXMJ3PRr5DbQ4O/BxzAnJWOIcJdLzW6qHY=
|
||||||
github.com/metacubex/ascon v0.1.0 h1:6ZWxmXYszT1XXtwkf6nxfFhc/OTtQ9R3Vyj1jN32lGM=
|
github.com/metacubex/ascon v0.1.0 h1:6ZWxmXYszT1XXtwkf6nxfFhc/OTtQ9R3Vyj1jN32lGM=
|
||||||
github.com/metacubex/ascon v0.1.0/go.mod h1:eV5oim4cVPPdEL8/EYaTZ0iIKARH9pnhAK/fcT5Kacc=
|
github.com/metacubex/ascon v0.1.0/go.mod h1:eV5oim4cVPPdEL8/EYaTZ0iIKARH9pnhAK/fcT5Kacc=
|
||||||
github.com/metacubex/bart v0.24.0 h1:EyNiPeVOlg0joSHTzi5oentI0j5M89utUq/5dd76pWM=
|
github.com/metacubex/bart v0.26.0 h1:d/bBTvVatfVWGfQbiDpYKI1bXUJgjaabB2KpK1Tnk6w=
|
||||||
github.com/metacubex/bart v0.24.0/go.mod h1:DCcyfP4MC+Zy7sLK7XeGuMw+P5K9mIRsYOBgiE8icsI=
|
github.com/metacubex/bart v0.26.0/go.mod h1:DCcyfP4MC+Zy7sLK7XeGuMw+P5K9mIRsYOBgiE8icsI=
|
||||||
github.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b h1:j7dadXD8I2KTmMt8jg1JcaP1ANL3JEObJPdANKcSYPY=
|
github.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b h1:j7dadXD8I2KTmMt8jg1JcaP1ANL3JEObJPdANKcSYPY=
|
||||||
github.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b/go.mod h1:+WmP0VJZDkDszvpa83HzfUp6QzARl/IKkMorH4+nODw=
|
github.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b/go.mod h1:+WmP0VJZDkDszvpa83HzfUp6QzARl/IKkMorH4+nODw=
|
||||||
github.com/metacubex/blake3 v0.1.0 h1:KGnjh/56REO7U+cgZA8dnBhxdP7jByrG7hTP+bu6cqY=
|
github.com/metacubex/blake3 v0.1.0 h1:KGnjh/56REO7U+cgZA8dnBhxdP7jByrG7hTP+bu6cqY=
|
||||||
@@ -104,12 +104,12 @@ github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 h1:cjd4biTvO
|
|||||||
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759/go.mod h1:UHOv2xu+RIgLwpXca7TLrXleEd4oR3sPatW6IF8wU88=
|
github.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759/go.mod h1:UHOv2xu+RIgLwpXca7TLrXleEd4oR3sPatW6IF8wU88=
|
||||||
github.com/metacubex/gvisor v0.0.0-20250919004547-6122b699a301 h1:N5GExQJqYAH3gOCshpp2u/J3CtNYzMctmlb0xK9wtbQ=
|
github.com/metacubex/gvisor v0.0.0-20250919004547-6122b699a301 h1:N5GExQJqYAH3gOCshpp2u/J3CtNYzMctmlb0xK9wtbQ=
|
||||||
github.com/metacubex/gvisor v0.0.0-20250919004547-6122b699a301/go.mod h1:8LpS0IJW1VmWzUm3ylb0e2SK5QDm5lO/2qwWLZgRpBU=
|
github.com/metacubex/gvisor v0.0.0-20250919004547-6122b699a301/go.mod h1:8LpS0IJW1VmWzUm3ylb0e2SK5QDm5lO/2qwWLZgRpBU=
|
||||||
github.com/metacubex/kcp-go v0.0.0-20250923001605-1ba6f691c45b h1:z7JLKjugnQ1qvDOAD8yMA5C8AlJY3bG+VrrgRntRlUY=
|
github.com/metacubex/kcp-go v0.0.0-20251105084629-8c93f4bf37be h1:Y7SigZIqfv/+RIA/D7R6EbB9p+brPRoGOM6zobSmRIM=
|
||||||
github.com/metacubex/kcp-go v0.0.0-20250923001605-1ba6f691c45b/go.mod h1:HIJZW4QMhbBqXuqC1ly6Hn0TEYT2SzRw58ns1yGhXTs=
|
github.com/metacubex/kcp-go v0.0.0-20251105084629-8c93f4bf37be/go.mod h1:HIJZW4QMhbBqXuqC1ly6Hn0TEYT2SzRw58ns1yGhXTs=
|
||||||
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 h1:1Qpuy+sU3DmyX9HwI+CrBT/oLNJngvBorR2RbajJcqo=
|
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 h1:1Qpuy+sU3DmyX9HwI+CrBT/oLNJngvBorR2RbajJcqo=
|
||||||
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793/go.mod h1:RjRNb4G52yAgfR+Oe/kp9G4PJJ97Fnj89eY1BFO3YyA=
|
github.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793/go.mod h1:RjRNb4G52yAgfR+Oe/kp9G4PJJ97Fnj89eY1BFO3YyA=
|
||||||
github.com/metacubex/quic-go v0.54.1-0.20250730114134-a1ae705fe295 h1:8JVlYuE8uSJAvmyCd4TjvDxs57xjb0WxEoaWafK5+qs=
|
github.com/metacubex/quic-go v0.55.1-0.20251024060151-bd465f127128 h1:I1uvJl206/HbkzEAZpLgGkZgUveOZb+P+6oTUj7dN+o=
|
||||||
github.com/metacubex/quic-go v0.54.1-0.20250730114134-a1ae705fe295/go.mod h1:1lktQFtCD17FZliVypbrDHwbsFSsmz2xz2TRXydvB5c=
|
github.com/metacubex/quic-go v0.55.1-0.20251024060151-bd465f127128/go.mod h1:1lktQFtCD17FZliVypbrDHwbsFSsmz2xz2TRXydvB5c=
|
||||||
github.com/metacubex/randv2 v0.2.0 h1:uP38uBvV2SxYfLj53kuvAjbND4RUDfFJjwr4UigMiLs=
|
github.com/metacubex/randv2 v0.2.0 h1:uP38uBvV2SxYfLj53kuvAjbND4RUDfFJjwr4UigMiLs=
|
||||||
github.com/metacubex/randv2 v0.2.0/go.mod h1:kFi2SzrQ5WuneuoLLCMkABtiBu6VRrMrWFqSPyj2cxY=
|
github.com/metacubex/randv2 v0.2.0/go.mod h1:kFi2SzrQ5WuneuoLLCMkABtiBu6VRrMrWFqSPyj2cxY=
|
||||||
github.com/metacubex/restls-client-go v0.1.7 h1:eCwiXCTQb5WJu9IlgYvDBA1OgrINv58dEe7hcN5H15k=
|
github.com/metacubex/restls-client-go v0.1.7 h1:eCwiXCTQb5WJu9IlgYvDBA1OgrINv58dEe7hcN5H15k=
|
||||||
@@ -119,26 +119,26 @@ github.com/metacubex/sing v0.5.6 h1:mEPDCadsCj3DB8gn+t/EtposlYuALEkExa/LUguw6/c=
|
|||||||
github.com/metacubex/sing v0.5.6/go.mod h1:ypf0mjwlZm0sKdQSY+yQvmsbWa0hNPtkeqyRMGgoN+w=
|
github.com/metacubex/sing v0.5.6/go.mod h1:ypf0mjwlZm0sKdQSY+yQvmsbWa0hNPtkeqyRMGgoN+w=
|
||||||
github.com/metacubex/sing-mux v0.3.4 h1:tf4r27CIkzaxq9kBlAXQkgMXq2HPp5Mta60Kb4RCZF0=
|
github.com/metacubex/sing-mux v0.3.4 h1:tf4r27CIkzaxq9kBlAXQkgMXq2HPp5Mta60Kb4RCZF0=
|
||||||
github.com/metacubex/sing-mux v0.3.4/go.mod h1:SEJfAuykNj/ozbPqngEYqyggwSr81+L7Nu09NRD5mh4=
|
github.com/metacubex/sing-mux v0.3.4/go.mod h1:SEJfAuykNj/ozbPqngEYqyggwSr81+L7Nu09NRD5mh4=
|
||||||
github.com/metacubex/sing-quic v0.0.0-20250909002258-06122df8f231 h1:dGvo7UahC/gYBQNBoictr14baJzBjAKUAorP63QFFtg=
|
github.com/metacubex/sing-quic v0.0.0-20251004051927-c45ee18473bb h1:gxrJmnxuEAel+kh3V7ntqkHjURif0xKDu76nzr/BF5Y=
|
||||||
github.com/metacubex/sing-quic v0.0.0-20250909002258-06122df8f231/go.mod h1:B60FxaPHjR1SeQB0IiLrgwgvKsaoASfOWdiqhLjmMGA=
|
github.com/metacubex/sing-quic v0.0.0-20251004051927-c45ee18473bb/go.mod h1:JK4+PYUKps6pnlicKjsSUAjAcvIUjhorIjdNZGg930M=
|
||||||
github.com/metacubex/sing-shadowsocks v0.2.12 h1:Wqzo8bYXrK5aWqxu/TjlTnYZzAKtKsaFQBdr6IHFaBE=
|
github.com/metacubex/sing-shadowsocks v0.2.12 h1:Wqzo8bYXrK5aWqxu/TjlTnYZzAKtKsaFQBdr6IHFaBE=
|
||||||
github.com/metacubex/sing-shadowsocks v0.2.12/go.mod h1:2e5EIaw0rxKrm1YTRmiMnDulwbGxH9hAFlrwQLQMQkU=
|
github.com/metacubex/sing-shadowsocks v0.2.12/go.mod h1:2e5EIaw0rxKrm1YTRmiMnDulwbGxH9hAFlrwQLQMQkU=
|
||||||
github.com/metacubex/sing-shadowsocks2 v0.2.7 h1:hSuuc0YpsfiqYqt1o+fP4m34BQz4e6wVj3PPBVhor3A=
|
github.com/metacubex/sing-shadowsocks2 v0.2.7 h1:hSuuc0YpsfiqYqt1o+fP4m34BQz4e6wVj3PPBVhor3A=
|
||||||
github.com/metacubex/sing-shadowsocks2 v0.2.7/go.mod h1:vOEbfKC60txi0ca+yUlqEwOGc3Obl6cnSgx9Gf45KjE=
|
github.com/metacubex/sing-shadowsocks2 v0.2.7/go.mod h1:vOEbfKC60txi0ca+yUlqEwOGc3Obl6cnSgx9Gf45KjE=
|
||||||
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI=
|
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI=
|
||||||
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E=
|
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E=
|
||||||
github.com/metacubex/sing-tun v0.4.8 h1:3PyiUKWXYi37yHptXskzL1723O3OUdyt0Aej4XHVikM=
|
github.com/metacubex/sing-tun v0.4.9 h1:jY0Yyt8nnN3yQRN/jTxgqNCmGi1dsFdxdIi7pQUlVVU=
|
||||||
github.com/metacubex/sing-tun v0.4.8/go.mod h1:L/TjQY5JEGy8nvsuYmy/XgMFMCPiF0+AWSFCYfS6r9w=
|
github.com/metacubex/sing-tun v0.4.9/go.mod h1:L/TjQY5JEGy8nvsuYmy/XgMFMCPiF0+AWSFCYfS6r9w=
|
||||||
github.com/metacubex/sing-vmess v0.2.4 h1:Tx6AGgCiEf400E/xyDuYyafsel6sGbR8oF7RkAaus6I=
|
github.com/metacubex/sing-vmess v0.2.4 h1:Tx6AGgCiEf400E/xyDuYyafsel6sGbR8oF7RkAaus6I=
|
||||||
github.com/metacubex/sing-vmess v0.2.4/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM=
|
github.com/metacubex/sing-vmess v0.2.4/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM=
|
||||||
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU=
|
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU=
|
||||||
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f/go.mod h1:jpAkVLPnCpGSfNyVmj6Cq4YbuZsFepm/Dc+9BAOcR80=
|
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f/go.mod h1:jpAkVLPnCpGSfNyVmj6Cq4YbuZsFepm/Dc+9BAOcR80=
|
||||||
github.com/metacubex/smux v0.0.0-20250922175018-15c9a6a78719 h1:T6qCCfolRDAVJKeaPW/mXwNLjnlo65AYN7WS2jrBNaM=
|
github.com/metacubex/smux v0.0.0-20250922175018-15c9a6a78719 h1:T6qCCfolRDAVJKeaPW/mXwNLjnlo65AYN7WS2jrBNaM=
|
||||||
github.com/metacubex/smux v0.0.0-20250922175018-15c9a6a78719/go.mod h1:4bPD8HWx9jPJ9aE4uadgyN7D1/Wz3KmPy+vale8sKLE=
|
github.com/metacubex/smux v0.0.0-20250922175018-15c9a6a78719/go.mod h1:4bPD8HWx9jPJ9aE4uadgyN7D1/Wz3KmPy+vale8sKLE=
|
||||||
github.com/metacubex/tfo-go v0.0.0-20250921095601-b102db4216c0 h1:Ui+/2s5Qz0lSnDUBmEL12M5Oi/PzvFxGTNohm8ZcsmE=
|
github.com/metacubex/tfo-go v0.0.0-20251024101424-368b42b59148 h1:Zd0QqciLIhv9MKbGKTPEgN8WUFsgQGA1WJBy6spEnVU=
|
||||||
github.com/metacubex/tfo-go v0.0.0-20250921095601-b102db4216c0/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw=
|
github.com/metacubex/tfo-go v0.0.0-20251024101424-368b42b59148/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw=
|
||||||
github.com/metacubex/utls v1.8.1 h1:RW8GeCGWAegjV0HW5nw9DoqNoeGAXXeYUP6AysmRvx4=
|
github.com/metacubex/utls v1.8.3 h1:0m/yCxm3SK6kWve2lKiFb1pue1wHitJ8sQQD4Ikqde4=
|
||||||
github.com/metacubex/utls v1.8.1/go.mod h1:kncGGVhFaoGn5M3pFe3SXhZCzsbCJayNOH4UEqTKTko=
|
github.com/metacubex/utls v1.8.3/go.mod h1:kncGGVhFaoGn5M3pFe3SXhZCzsbCJayNOH4UEqTKTko=
|
||||||
github.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f h1:FGBPRb1zUabhPhDrlKEjQ9lgIwQ6cHL4x8M9lrERhbk=
|
github.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f h1:FGBPRb1zUabhPhDrlKEjQ9lgIwQ6cHL4x8M9lrERhbk=
|
||||||
github.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f/go.mod h1:oPGcV994OGJedmmxrcK9+ni7jUEMGhR+uVQAdaduIP4=
|
github.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f/go.mod h1:oPGcV994OGJedmmxrcK9+ni7jUEMGhR+uVQAdaduIP4=
|
||||||
github.com/metacubex/yamux v0.0.0-20250918083631-dd5f17c0be49 h1:lhlqpYHopuTLx9xQt22kSA9HtnyTDmk5XjjQVCGHe2E=
|
github.com/metacubex/yamux v0.0.0-20250918083631-dd5f17c0be49 h1:lhlqpYHopuTLx9xQt22kSA9HtnyTDmk5XjjQVCGHe2E=
|
||||||
@@ -170,8 +170,8 @@ github.com/sagernet/cors v1.2.1 h1:Cv5Z8y9YSD6Gm+qSpNrL3LO4lD3eQVvbFYJSG7JCMHQ=
|
|||||||
github.com/sagernet/cors v1.2.1/go.mod h1:O64VyOjjhrkLmQIjF4KGRrJO/5dVXFdpEmCW/eISRAI=
|
github.com/sagernet/cors v1.2.1/go.mod h1:O64VyOjjhrkLmQIjF4KGRrJO/5dVXFdpEmCW/eISRAI=
|
||||||
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a h1:ObwtHN2VpqE0ZNjr6sGeT00J8uU7JF4cNUdb44/Duis=
|
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a h1:ObwtHN2VpqE0ZNjr6sGeT00J8uU7JF4cNUdb44/Duis=
|
||||||
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
|
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
|
||||||
github.com/samber/lo v1.51.0 h1:kysRYLbHy/MB7kQZf5DSN50JHmMsNEdeY24VzJFu7wI=
|
github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw=
|
||||||
github.com/samber/lo v1.51.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
|
github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
|
||||||
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b h1:rXHg9GrUEtWZhEkrykicdND3VPjlVbYiLdX9J7gimS8=
|
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b h1:rXHg9GrUEtWZhEkrykicdND3VPjlVbYiLdX9J7gimS8=
|
||||||
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b/go.mod h1:X7qrxNQViEaAN9LNZOPl9PfvQtp3V3c7LTo0dvGi0fM=
|
github.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b/go.mod h1:X7qrxNQViEaAN9LNZOPl9PfvQtp3V3c7LTo0dvGi0fM=
|
||||||
github.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c h1:DjKMC30y6yjG3IxDaeAj3PCoRr+IsO+bzyT+Se2m2Hk=
|
github.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c h1:DjKMC30y6yjG3IxDaeAj3PCoRr+IsO+bzyT+Se2m2Hk=
|
||||||
@@ -211,7 +211,6 @@ gitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7/go.mod h1:E+r
|
|||||||
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo=
|
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo=
|
||||||
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ=
|
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ=
|
||||||
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
|
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
|
||||||
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
|
|
||||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M=
|
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M=
|
||||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
|
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
|||||||
@@ -24,15 +24,14 @@ class Application extends ConsumerStatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ApplicationState extends ConsumerState<Application> {
|
class ApplicationState extends ConsumerState<Application> {
|
||||||
Timer? _autoUpdateGroupTaskTimer;
|
|
||||||
Timer? _autoUpdateProfilesTaskTimer;
|
Timer? _autoUpdateProfilesTaskTimer;
|
||||||
|
|
||||||
final _pageTransitionsTheme = const PageTransitionsTheme(
|
final _pageTransitionsTheme = const PageTransitionsTheme(
|
||||||
builders: <TargetPlatform, PageTransitionsBuilder>{
|
builders: <TargetPlatform, PageTransitionsBuilder>{
|
||||||
TargetPlatform.android: CommonPageTransitionsBuilder(),
|
TargetPlatform.android: commonSharedXPageTransitions,
|
||||||
TargetPlatform.windows: CommonPageTransitionsBuilder(),
|
TargetPlatform.windows: commonSharedXPageTransitions,
|
||||||
TargetPlatform.linux: CommonPageTransitionsBuilder(),
|
TargetPlatform.linux: commonSharedXPageTransitions,
|
||||||
TargetPlatform.macOS: CommonPageTransitionsBuilder(),
|
TargetPlatform.macOS: commonSharedXPageTransitions,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -102,7 +101,7 @@ class ApplicationState extends ConsumerState<Application> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildApp({required Widget child}) {
|
Widget _buildApp({required Widget child}) {
|
||||||
return MessageManager(child: ThemeManager(child: child));
|
return StatusManager(child: ThemeManager(child: child));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -162,7 +161,6 @@ class ApplicationState extends ConsumerState<Application> {
|
|||||||
@override
|
@override
|
||||||
Future<void> dispose() async {
|
Future<void> dispose() async {
|
||||||
linkManager.destroy();
|
linkManager.destroy();
|
||||||
_autoUpdateGroupTaskTimer?.cancel();
|
|
||||||
_autoUpdateProfilesTaskTimer?.cancel();
|
_autoUpdateProfilesTaskTimer?.cancel();
|
||||||
await coreController.destroy();
|
await coreController.destroy();
|
||||||
await globalState.appController.savePreferences();
|
await globalState.appController.savePreferences();
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import 'package:fl_clash/l10n/l10n.dart';
|
import 'package:fl_clash/l10n/l10n.dart';
|
||||||
|
|
||||||
final appLocalizations = AppLocalizations.current;
|
final appLocalizations = AppLocalizations.current;
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import 'package:path/path.dart';
|
|||||||
extension ArchiveExt on Archive {
|
extension ArchiveExt on Archive {
|
||||||
void addDirectoryToArchive(String dirPath, String parentPath) {
|
void addDirectoryToArchive(String dirPath, String parentPath) {
|
||||||
final dir = Directory(dirPath);
|
final dir = Directory(dirPath);
|
||||||
|
if (!dir.existsSync()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final entities = dir.listSync(recursive: false);
|
final entities = dir.listSync(recursive: false);
|
||||||
for (final entity in entities) {
|
for (final entity in entities) {
|
||||||
final relativePath = relative(entity.path, from: parentPath);
|
final relativePath = relative(entity.path, from: parentPath);
|
||||||
|
|||||||
@@ -38,3 +38,4 @@ export 'text.dart';
|
|||||||
export 'tray.dart';
|
export 'tray.dart';
|
||||||
export 'utils.dart';
|
export 'utils.dart';
|
||||||
export 'window.dart';
|
export 'window.dart';
|
||||||
|
export 'yaml.dart';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ List<Group> computeSort({
|
|||||||
required List<Group> groups,
|
required List<Group> groups,
|
||||||
required ProxiesSortType sortType,
|
required ProxiesSortType sortType,
|
||||||
required DelayMap delayMap,
|
required DelayMap delayMap,
|
||||||
required SelectedMap selectedMap,
|
required Map<String, String> selectedMap,
|
||||||
required String defaultTestUrl,
|
required String defaultTestUrl,
|
||||||
}) {
|
}) {
|
||||||
return groups.map((group) {
|
return groups.map((group) {
|
||||||
@@ -31,7 +31,7 @@ DelayState computeProxyDelayState({
|
|||||||
required String proxyName,
|
required String proxyName,
|
||||||
required String testUrl,
|
required String testUrl,
|
||||||
required List<Group> groups,
|
required List<Group> groups,
|
||||||
required SelectedMap selectedMap,
|
required Map<String, String> selectedMap,
|
||||||
required DelayMap delayMap,
|
required DelayMap delayMap,
|
||||||
}) {
|
}) {
|
||||||
final state = computeRealSelectedProxyState(
|
final state = computeRealSelectedProxyState(
|
||||||
@@ -47,7 +47,7 @@ DelayState computeProxyDelayState({
|
|||||||
SelectedProxyState computeRealSelectedProxyState(
|
SelectedProxyState computeRealSelectedProxyState(
|
||||||
String proxyName, {
|
String proxyName, {
|
||||||
required List<Group> groups,
|
required List<Group> groups,
|
||||||
required SelectedMap selectedMap,
|
required Map<String, String> selectedMap,
|
||||||
}) {
|
}) {
|
||||||
return _getRealSelectedProxyState(
|
return _getRealSelectedProxyState(
|
||||||
SelectedProxyState(proxyName: proxyName),
|
SelectedProxyState(proxyName: proxyName),
|
||||||
@@ -59,7 +59,7 @@ SelectedProxyState computeRealSelectedProxyState(
|
|||||||
SelectedProxyState _getRealSelectedProxyState(
|
SelectedProxyState _getRealSelectedProxyState(
|
||||||
SelectedProxyState state, {
|
SelectedProxyState state, {
|
||||||
required List<Group> groups,
|
required List<Group> groups,
|
||||||
required SelectedMap selectedMap,
|
required Map<String, String> selectedMap,
|
||||||
}) {
|
}) {
|
||||||
if (state.proxyName.isEmpty) return state;
|
if (state.proxyName.isEmpty) return state;
|
||||||
final index = groups.indexWhere((element) => element.name == state.proxyName);
|
final index = groups.indexWhere((element) => element.name == state.proxyName);
|
||||||
@@ -83,7 +83,7 @@ List<Proxy> _sortOfDelay({
|
|||||||
required List<Group> groups,
|
required List<Group> groups,
|
||||||
required List<Proxy> proxies,
|
required List<Proxy> proxies,
|
||||||
required DelayMap delayMap,
|
required DelayMap delayMap,
|
||||||
required SelectedMap selectedMap,
|
required Map<String, String> selectedMap,
|
||||||
required String testUrl,
|
required String testUrl,
|
||||||
}) {
|
}) {
|
||||||
return List.from(proxies)..sort((a, b) {
|
return List.from(proxies)..sort((a, b) {
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ final baseInfoEdgeInsets = EdgeInsets.symmetric(
|
|||||||
vertical: 16.ap,
|
vertical: 16.ap,
|
||||||
horizontal: 16.ap,
|
horizontal: 16.ap,
|
||||||
);
|
);
|
||||||
|
final listHeaderPadding = EdgeInsets.only(
|
||||||
|
left: 16.ap,
|
||||||
|
right: 8.ap,
|
||||||
|
top: 24.ap,
|
||||||
|
bottom: 8.ap,
|
||||||
|
);
|
||||||
|
|
||||||
final defaultTextScaleFactor =
|
final defaultTextScaleFactor =
|
||||||
WidgetsBinding.instance.platformDispatcher.textScaleFactor;
|
WidgetsBinding.instance.platformDispatcher.textScaleFactor;
|
||||||
@@ -63,10 +69,14 @@ const stringListEquality = ListEquality<String>();
|
|||||||
const intListEquality = ListEquality<int>();
|
const intListEquality = ListEquality<int>();
|
||||||
const logListEquality = ListEquality<Log>();
|
const logListEquality = ListEquality<Log>();
|
||||||
const groupListEquality = ListEquality<Group>();
|
const groupListEquality = ListEquality<Group>();
|
||||||
|
const ruleListEquality = ListEquality<Rule>();
|
||||||
|
const scriptEquality = ListEquality<Script>();
|
||||||
const externalProviderListEquality = ListEquality<ExternalProvider>();
|
const externalProviderListEquality = ListEquality<ExternalProvider>();
|
||||||
const packageListEquality = ListEquality<Package>();
|
const packageListEquality = ListEquality<Package>();
|
||||||
const hotKeyActionListEquality = ListEquality<HotKeyAction>();
|
const hotKeyActionListEquality = ListEquality<HotKeyAction>();
|
||||||
const stringAndStringMapEquality = MapEquality<String, String>();
|
const stringAndStringMapEquality = MapEquality<String, String>();
|
||||||
|
const stringAndStringMapEntryListEquality =
|
||||||
|
ListEquality<MapEntry<String, String>>();
|
||||||
const stringAndStringMapEntryIterableEquality =
|
const stringAndStringMapEntryIterableEquality =
|
||||||
IterableEquality<MapEntry<String, String>>();
|
IterableEquality<MapEntry<String, String>>();
|
||||||
const delayMapEquality = MapEquality<String, Map<String, int?>>();
|
const delayMapEquality = MapEquality<String, Map<String, int?>>();
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import 'package:fl_clash/manager/message_manager.dart';
|
import 'package:fl_clash/l10n/l10n.dart';
|
||||||
|
import 'package:fl_clash/manager/manager.dart';
|
||||||
|
import 'package:fl_clash/models/widget.dart';
|
||||||
import 'package:fl_clash/widgets/scaffold.dart';
|
import 'package:fl_clash/widgets/scaffold.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -7,8 +9,11 @@ extension BuildContextExtension on BuildContext {
|
|||||||
return findAncestorStateOfType<CommonScaffoldState>();
|
return findAncestorStateOfType<CommonScaffoldState>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void showNotifier(String text) {
|
void showNotifier(String text, {MessageActionState? actionState}) {
|
||||||
return findAncestorStateOfType<MessageManagerState>()?.message(text);
|
return findAncestorStateOfType<StatusManagerState>()?.message(
|
||||||
|
text,
|
||||||
|
actionState: actionState,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showSnackBar(String message, {SnackBarAction? action}) {
|
void showSnackBar(String message, {SnackBarAction? action}) {
|
||||||
@@ -42,6 +47,8 @@ extension BuildContextExtension on BuildContext {
|
|||||||
|
|
||||||
TextTheme get textTheme => Theme.of(this).textTheme;
|
TextTheme get textTheme => Theme.of(this).textTheme;
|
||||||
|
|
||||||
|
AppLocalizations get appLocalizations => AppLocalizations.of(this);
|
||||||
|
|
||||||
T? findLastStateOfType<T extends State>() {
|
T? findLastStateOfType<T extends State>() {
|
||||||
T? state;
|
T? state;
|
||||||
|
|
||||||
|
|||||||
@@ -17,23 +17,25 @@ extension DateTimeExtension on DateTime {
|
|||||||
final difference = currentDateTime.difference(this);
|
final difference = currentDateTime.difference(this);
|
||||||
final days = difference.inDays;
|
final days = difference.inDays;
|
||||||
if (days >= 365) {
|
if (days >= 365) {
|
||||||
return '${(days / 365).floor()} ${appLocalizations.years}${appLocalizations.ago}';
|
final years = (days / 365).floor();
|
||||||
|
return appLocalizations.yearsAgo(years);
|
||||||
}
|
}
|
||||||
if (days >= 30) {
|
if (days >= 30) {
|
||||||
return '${(days / 30).floor()} ${appLocalizations.months}${appLocalizations.ago}';
|
final months = (days / 30).floor();
|
||||||
|
return appLocalizations.monthsAgo(months);
|
||||||
}
|
}
|
||||||
if (days >= 1) {
|
if (days >= 1) {
|
||||||
return '$days ${appLocalizations.days}${appLocalizations.ago}';
|
return appLocalizations.daysAgo(days);
|
||||||
}
|
}
|
||||||
final hours = difference.inHours;
|
final hours = difference.inHours;
|
||||||
if (hours >= 1) {
|
if (hours >= 1) {
|
||||||
return '$hours ${appLocalizations.hours}${appLocalizations.ago}';
|
return appLocalizations.hoursAgo(hours);
|
||||||
}
|
}
|
||||||
final minutes = difference.inMinutes;
|
final minutes = difference.inMinutes;
|
||||||
if (minutes >= 1) {
|
if (minutes >= 1) {
|
||||||
return '$minutes ${appLocalizations.minutes}${appLocalizations.ago}';
|
return appLocalizations.minutesAgo(minutes);
|
||||||
}
|
}
|
||||||
return appLocalizations.just;
|
return appLocalizations.justNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
String get show {
|
String get show {
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ extension FutureExt<T> on Future<T> {
|
|||||||
VoidCallback? onLast,
|
VoidCallback? onLast,
|
||||||
FutureOr<T> Function()? onTimeout,
|
FutureOr<T> Function()? onTimeout,
|
||||||
}) {
|
}) {
|
||||||
final realTimout = timeout ?? const Duration(minutes: 3);
|
final realTimeout = timeout ?? const Duration(minutes: 3);
|
||||||
Timer(realTimout + commonDuration, () {
|
Timer(realTimeout + commonDuration, () {
|
||||||
if (onLast != null) {
|
if (onLast != null) {
|
||||||
onLast();
|
onLast();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return this.timeout(
|
return this.timeout(
|
||||||
realTimout,
|
realTimeout,
|
||||||
onTimeout: () async {
|
onTimeout: () async {
|
||||||
if (onTimeout != null) {
|
if (onTimeout != null) {
|
||||||
return onTimeout();
|
return onTimeout();
|
||||||
|
|||||||
@@ -23,10 +23,7 @@ extension IterableExt<T> on Iterable<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterable<T> fill(
|
Iterable<T> fill(int length, {required T Function(int count) filler}) sync* {
|
||||||
int length, {
|
|
||||||
required T Function(int count) filler,
|
|
||||||
}) sync* {
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (var item in this) {
|
for (var item in this) {
|
||||||
yield item;
|
yield item;
|
||||||
@@ -85,6 +82,31 @@ extension ListExt<T> on List<T> {
|
|||||||
if (length > index) return this[index];
|
if (length > index) return this[index];
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T safeLast(T value) {
|
||||||
|
if (isNotEmpty) {
|
||||||
|
return last;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void addOrRemove(T value) {
|
||||||
|
if (contains(value)) {
|
||||||
|
remove(value);
|
||||||
|
} else {
|
||||||
|
add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SetExt<T> on Set<T> {
|
||||||
|
void addOrRemove(T value) {
|
||||||
|
if (contains(value)) {
|
||||||
|
remove(value);
|
||||||
|
} else {
|
||||||
|
add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension DoubleListExt on List<double> {
|
extension DoubleListExt on List<double> {
|
||||||
@@ -120,4 +142,14 @@ extension MapExt<K, V> on Map<K, V> {
|
|||||||
}
|
}
|
||||||
return this[key]!;
|
return this[key]!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<K, V> copyWitUpdate(K key, V? value) {
|
||||||
|
final newMap = Map<K, V>.from(this);
|
||||||
|
if (value == null) {
|
||||||
|
newMap.remove(key);
|
||||||
|
} else {
|
||||||
|
newMap[key] = value;
|
||||||
|
}
|
||||||
|
return newMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,26 +8,16 @@ class Measure {
|
|||||||
final Map<String, dynamic> _measureMap;
|
final Map<String, dynamic> _measureMap;
|
||||||
|
|
||||||
Measure.of(this.context, double textScaleFactor)
|
Measure.of(this.context, double textScaleFactor)
|
||||||
: _measureMap = {},
|
: _measureMap = {},
|
||||||
_textScaler = TextScaler.linear(
|
_textScaler = TextScaler.linear(textScaleFactor);
|
||||||
textScaleFactor,
|
|
||||||
);
|
|
||||||
|
|
||||||
Size computeTextSize(
|
Size computeTextSize(Text text, {double maxWidth = double.infinity}) {
|
||||||
Text text, {
|
|
||||||
double maxWidth = double.infinity,
|
|
||||||
}) {
|
|
||||||
final textPainter = TextPainter(
|
final textPainter = TextPainter(
|
||||||
text: TextSpan(
|
text: TextSpan(text: text.data, style: text.style),
|
||||||
text: text.data,
|
|
||||||
style: text.style,
|
|
||||||
),
|
|
||||||
maxLines: text.maxLines,
|
maxLines: text.maxLines,
|
||||||
textScaler: _textScaler,
|
textScaler: _textScaler,
|
||||||
textDirection: text.textDirection ?? TextDirection.ltr,
|
textDirection: text.textDirection ?? TextDirection.ltr,
|
||||||
)..layout(
|
)..layout(maxWidth: maxWidth);
|
||||||
maxWidth: maxWidth,
|
|
||||||
);
|
|
||||||
return textPainter.size;
|
return textPainter.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,10 +25,7 @@ class Measure {
|
|||||||
return _measureMap.updateCacheValue(
|
return _measureMap.updateCacheValue(
|
||||||
'bodyMediumHeight',
|
'bodyMediumHeight',
|
||||||
() => computeTextSize(
|
() => computeTextSize(
|
||||||
Text(
|
Text('X', style: context.textTheme.bodyMedium),
|
||||||
'X',
|
|
||||||
style: context.textTheme.bodyMedium,
|
|
||||||
),
|
|
||||||
).height,
|
).height,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -46,24 +33,16 @@ class Measure {
|
|||||||
double get bodyLargeHeight {
|
double get bodyLargeHeight {
|
||||||
return _measureMap.updateCacheValue(
|
return _measureMap.updateCacheValue(
|
||||||
'bodyLargeHeight',
|
'bodyLargeHeight',
|
||||||
() => computeTextSize(
|
() =>
|
||||||
Text(
|
computeTextSize(Text('X', style: context.textTheme.bodyLarge)).height,
|
||||||
'X',
|
|
||||||
style: context.textTheme.bodyLarge,
|
|
||||||
),
|
|
||||||
).height,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
double get bodySmallHeight {
|
double get bodySmallHeight {
|
||||||
return _measureMap.updateCacheValue(
|
return _measureMap.updateCacheValue(
|
||||||
'bodySmallHeight',
|
'bodySmallHeight',
|
||||||
() => computeTextSize(
|
() =>
|
||||||
Text(
|
computeTextSize(Text('X', style: context.textTheme.bodySmall)).height,
|
||||||
'X',
|
|
||||||
style: context.textTheme.bodySmall,
|
|
||||||
),
|
|
||||||
).height,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,10 +50,16 @@ class Measure {
|
|||||||
return _measureMap.updateCacheValue(
|
return _measureMap.updateCacheValue(
|
||||||
'labelSmallHeight',
|
'labelSmallHeight',
|
||||||
() => computeTextSize(
|
() => computeTextSize(
|
||||||
Text(
|
Text('X', style: context.textTheme.labelSmall),
|
||||||
'X',
|
).height,
|
||||||
style: context.textTheme.labelSmall,
|
);
|
||||||
),
|
}
|
||||||
|
|
||||||
|
double get titleSmallHeight {
|
||||||
|
return _measureMap.updateCacheValue(
|
||||||
|
'titleSmallHeight',
|
||||||
|
() => computeTextSize(
|
||||||
|
Text('X', style: context.textTheme.titleSmall),
|
||||||
).height,
|
).height,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -83,10 +68,7 @@ class Measure {
|
|||||||
return _measureMap.updateCacheValue(
|
return _measureMap.updateCacheValue(
|
||||||
'labelMediumHeight',
|
'labelMediumHeight',
|
||||||
() => computeTextSize(
|
() => computeTextSize(
|
||||||
Text(
|
Text('X', style: context.textTheme.labelMedium),
|
||||||
'X',
|
|
||||||
style: context.textTheme.labelMedium,
|
|
||||||
),
|
|
||||||
).height,
|
).height,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -95,10 +77,7 @@ class Measure {
|
|||||||
return _measureMap.updateCacheValue(
|
return _measureMap.updateCacheValue(
|
||||||
'titleLargeHeight',
|
'titleLargeHeight',
|
||||||
() => computeTextSize(
|
() => computeTextSize(
|
||||||
Text(
|
Text('X', style: context.textTheme.titleLarge),
|
||||||
'X',
|
|
||||||
style: context.textTheme.titleLarge,
|
|
||||||
),
|
|
||||||
).height,
|
).height,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -107,10 +86,7 @@ class Measure {
|
|||||||
return _measureMap.updateCacheValue(
|
return _measureMap.updateCacheValue(
|
||||||
'titleMediumHeight',
|
'titleMediumHeight',
|
||||||
() => computeTextSize(
|
() => computeTextSize(
|
||||||
Text(
|
Text('X', style: context.textTheme.titleMedium),
|
||||||
'X',
|
|
||||||
style: context.textTheme.titleMedium,
|
|
||||||
),
|
|
||||||
).height,
|
).height,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ mixin AutoDisposeNotifierMixin<T> on AnyNotifier<T, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onUpdate(T value) {}
|
void onUpdate(T value) {}
|
||||||
|
|
||||||
|
void update(T Function(T) builder) {
|
||||||
|
final value = builder(state);
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin AnyNotifierMixin<T> on AnyNotifier<T, T> {
|
mixin AnyNotifierMixin<T> on AnyNotifier<T, T> {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:animations/animations.dart';
|
||||||
import 'package:fl_clash/common/common.dart';
|
import 'package:fl_clash/common/common.dart';
|
||||||
import 'package:fl_clash/enum/enum.dart';
|
import 'package:fl_clash/enum/enum.dart';
|
||||||
import 'package:fl_clash/models/models.dart';
|
import 'package:fl_clash/models/models.dart';
|
||||||
@@ -32,6 +33,11 @@ class BaseNavigator {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const commonSharedXPageTransitions = SharedAxisPageTransitionsBuilder(
|
||||||
|
transitionType: SharedAxisTransitionType.horizontal,
|
||||||
|
fillColor: Colors.transparent,
|
||||||
|
);
|
||||||
|
|
||||||
class CommonDesktopRoute<T> extends PageRoute<T> {
|
class CommonDesktopRoute<T> extends PageRoute<T> {
|
||||||
final Widget Function(BuildContext context) builder;
|
final Widget Function(BuildContext context) builder;
|
||||||
|
|
||||||
@@ -67,14 +73,45 @@ class CommonDesktopRoute<T> extends PageRoute<T> {
|
|||||||
Duration get reverseTransitionDuration => Duration(milliseconds: 200);
|
Duration get reverseTransitionDuration => Duration(milliseconds: 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
class CommonRoute<T> extends MaterialPageRoute<T> {
|
class CommonRoute<T> extends PageRoute<T> {
|
||||||
CommonRoute({required super.builder});
|
final Widget Function(BuildContext context) builder;
|
||||||
|
|
||||||
|
CommonRoute({required this.builder});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Duration get transitionDuration => const Duration(milliseconds: 500);
|
Color? get barrierColor => null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Duration get reverseTransitionDuration => const Duration(milliseconds: 500);
|
String? get barrierLabel => null;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get maintainState => true;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget buildPage(
|
||||||
|
BuildContext context,
|
||||||
|
Animation<double> animation,
|
||||||
|
Animation<double> secondaryAnimation,
|
||||||
|
) {
|
||||||
|
final Widget result = builder(context);
|
||||||
|
return Semantics(
|
||||||
|
scopesRoute: true,
|
||||||
|
explicitChildNodes: true,
|
||||||
|
child: SharedAxisTransition(
|
||||||
|
animation: animation,
|
||||||
|
secondaryAnimation: secondaryAnimation,
|
||||||
|
transitionType: SharedAxisTransitionType.horizontal,
|
||||||
|
fillColor: context.colorScheme.surface,
|
||||||
|
child: result,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Duration get transitionDuration => Duration(milliseconds: 300);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Duration get reverseTransitionDuration => Duration(milliseconds: 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Animatable<Offset> _kRightMiddleTween = Tween<Offset>(
|
final Animatable<Offset> _kRightMiddleTween = Tween<Offset>(
|
||||||
@@ -228,7 +265,7 @@ class _CommonPageTransitionState extends State<CommonPageTransition> {
|
|||||||
DecorationTween(
|
DecorationTween(
|
||||||
begin: const _CommonEdgeShadowDecoration(),
|
begin: const _CommonEdgeShadowDecoration(),
|
||||||
end: _CommonEdgeShadowDecoration(<Color>[
|
end: _CommonEdgeShadowDecoration(<Color>[
|
||||||
widget.context.colorScheme.inverseSurface.withValues(alpha: 0.02),
|
Color(0x04000000),
|
||||||
Colors.transparent,
|
Colors.transparent,
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
@@ -279,7 +316,7 @@ class _CommonEdgeShadowPainter extends BoxPainter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double shadowWidth = 1 * configuration.size!.width;
|
final double shadowWidth = 0.05 * configuration.size!.width;
|
||||||
final double shadowHeight = configuration.size!.height;
|
final double shadowHeight = configuration.size!.height;
|
||||||
final double bandWidth = shadowWidth / (colors.length - 1);
|
final double bandWidth = shadowWidth / (colors.length - 1);
|
||||||
|
|
||||||
|
|||||||
@@ -33,11 +33,25 @@ extension NumExt on num {
|
|||||||
unit: units[unitIndex].name,
|
unit: units[unitIndex].name,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TrafficShow get shortTraffic {
|
||||||
|
final units = TrafficUnit.values;
|
||||||
|
var size = toDouble();
|
||||||
|
var unitIndex = 0;
|
||||||
|
while (size >= 1024 && unitIndex < units.length - 1) {
|
||||||
|
size /= 1024;
|
||||||
|
unitIndex++;
|
||||||
|
}
|
||||||
|
return TrafficShow(
|
||||||
|
value: size.toStringAsFixed(0),
|
||||||
|
unit: ' ${units[unitIndex].name}',
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension DoubleExt on double {
|
extension DoubleExt on double {
|
||||||
bool moreOrEqual(double value) {
|
bool moreOrEqual(double value) {
|
||||||
return this > value || (value - this).abs() < precisionErrorTolerance + 1;
|
return this > value || (value - this).abs() < precisionErrorTolerance + 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class AppPath {
|
|||||||
|
|
||||||
Future<String> get configFilePath async {
|
Future<String> get configFilePath async {
|
||||||
final homeDirPath = await appPath.homeDirPath;
|
final homeDirPath = await appPath.homeDirPath;
|
||||||
return join(homeDirPath, 'config.json');
|
return join(homeDirPath, 'config.yaml');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> get validateFilePath async {
|
Future<String> get validateFilePath async {
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ class Preferences {
|
|||||||
|
|
||||||
Future<bool> saveConfig(Config config) async {
|
Future<bool> saveConfig(Config config) async {
|
||||||
final preferences = await sharedPreferencesCompleter.future;
|
final preferences = await sharedPreferencesCompleter.future;
|
||||||
return await preferences?.setString(configKey, json.encode(config)) ??
|
return preferences?.setString(configKey, json.encode(config)) ?? false;
|
||||||
false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> clearClashConfig() async {
|
Future<void> clearClashConfig() async {
|
||||||
|
|||||||
@@ -30,16 +30,15 @@ class Request {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Response> getFileResponseForUrl(String url) async {
|
Future<Response<Uint8List>> getFileResponseForUrl(String url) async {
|
||||||
final response = await _clashDio.get(
|
return await _clashDio.get<Uint8List>(
|
||||||
url,
|
url,
|
||||||
options: Options(responseType: ResponseType.bytes),
|
options: Options(responseType: ResponseType.bytes),
|
||||||
);
|
);
|
||||||
return response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Response> getTextResponseForUrl(String url) async {
|
Future<Response<String>> getTextResponseForUrl(String url) async {
|
||||||
final response = await _clashDio.get(
|
final response = await _clashDio.get<String>(
|
||||||
url,
|
url,
|
||||||
options: Options(responseType: ResponseType.plain),
|
options: Options(responseType: ResponseType.plain),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,6 +22,16 @@ extension StringExtension on String {
|
|||||||
return toLowerCase().compareTo(other.toLowerCase());
|
return toLowerCase().compareTo(other.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String safeSubstring(int start, [int? end]) {
|
||||||
|
if (isEmpty) return '';
|
||||||
|
final safeStart = start.clamp(0, length);
|
||||||
|
if (end == null) {
|
||||||
|
return substring(safeStart);
|
||||||
|
}
|
||||||
|
final safeEnd = end.clamp(safeStart, length);
|
||||||
|
return substring(safeStart, safeEnd);
|
||||||
|
}
|
||||||
|
|
||||||
List<int> get encodeUtf16LeWithBom {
|
List<int> get encodeUtf16LeWithBom {
|
||||||
final byteData = ByteData(length * 2);
|
final byteData = ByteData(length * 2);
|
||||||
final bom = [0xFF, 0xFE];
|
final bom = [0xFF, 0xFE];
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ class Windows {
|
|||||||
await Future.delayed(Duration(milliseconds: 300));
|
await Future.delayed(Duration(milliseconds: 300));
|
||||||
final retryStatus = await retry(
|
final retryStatus = await retry(
|
||||||
task: checkService,
|
task: checkService,
|
||||||
retryIf: (status) => status == WindowsHelperServiceStatus.running,
|
retryIf: (status) => status != WindowsHelperServiceStatus.running,
|
||||||
delay: commonDuration,
|
delay: commonDuration,
|
||||||
);
|
);
|
||||||
return res && retryStatus == WindowsHelperServiceStatus.running;
|
return res && retryStatus == WindowsHelperServiceStatus.running;
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:fl_clash/common/utils.dart';
|
import 'package:fl_clash/common/iterable.dart';
|
||||||
import 'package:fl_clash/enum/enum.dart';
|
import 'package:fl_clash/enum/enum.dart';
|
||||||
import 'package:fl_clash/models/models.dart';
|
import 'package:fl_clash/models/models.dart';
|
||||||
import 'package:fl_clash/state.dart';
|
import 'package:fl_clash/state.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tray_manager/tray_manager.dart';
|
import 'package:tray_manager/tray_manager.dart';
|
||||||
@@ -15,24 +14,34 @@ import 'system.dart';
|
|||||||
import 'window.dart';
|
import 'window.dart';
|
||||||
|
|
||||||
class Tray {
|
class Tray {
|
||||||
|
String get trayIconSuffix {
|
||||||
|
return system.isWindows ? 'ico' : 'png';
|
||||||
|
}
|
||||||
|
|
||||||
|
String getTryIcon({required bool isStart, required bool tunEnable}) {
|
||||||
|
if (system.isMacOS || !isStart) {
|
||||||
|
return 'assets/images/icon/status_1.$trayIconSuffix';
|
||||||
|
}
|
||||||
|
if (!tunEnable) {
|
||||||
|
return 'assets/images/icon/status_2.$trayIconSuffix';
|
||||||
|
}
|
||||||
|
return 'assets/images/icon/status_3.$trayIconSuffix';
|
||||||
|
}
|
||||||
|
|
||||||
Future _updateSystemTray({
|
Future _updateSystemTray({
|
||||||
required Brightness? brightness,
|
|
||||||
bool force = false,
|
bool force = false,
|
||||||
|
required bool isStart,
|
||||||
|
required bool tunEnable,
|
||||||
}) async {
|
}) async {
|
||||||
if (Platform.isLinux || force) {
|
if (Platform.isLinux || force) {
|
||||||
await trayManager.destroy();
|
await trayManager.destroy();
|
||||||
}
|
}
|
||||||
await trayManager.setIcon(
|
await trayManager.setIcon(
|
||||||
utils.getTrayIconPath(
|
getTryIcon(isStart: isStart, tunEnable: tunEnable),
|
||||||
brightness: brightness ??
|
|
||||||
WidgetsBinding.instance.platformDispatcher.platformBrightness,
|
|
||||||
),
|
|
||||||
isTemplate: true,
|
isTemplate: true,
|
||||||
);
|
);
|
||||||
if (!Platform.isLinux) {
|
if (!Platform.isLinux) {
|
||||||
await trayManager.setToolTip(
|
await trayManager.setToolTip(appName);
|
||||||
appName,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,9 +52,10 @@ class Tray {
|
|||||||
if (system.isAndroid) {
|
if (system.isAndroid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Platform.isLinux) {
|
if (!system.isLinux) {
|
||||||
await _updateSystemTray(
|
await _updateSystemTray(
|
||||||
brightness: trayState.brightness,
|
isStart: trayState.isStart,
|
||||||
|
tunEnable: trayState.tunEnable,
|
||||||
force: focus,
|
force: focus,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -65,6 +75,16 @@ class Tray {
|
|||||||
checked: false,
|
checked: false,
|
||||||
);
|
);
|
||||||
menuItems.add(startMenuItem);
|
menuItems.add(startMenuItem);
|
||||||
|
if (system.isMacOS) {
|
||||||
|
final speedStatistics = MenuItem.checkbox(
|
||||||
|
label: appLocalizations.speedStatistics,
|
||||||
|
onClick: (_) async {
|
||||||
|
globalState.appController.updateSpeedStatistics();
|
||||||
|
},
|
||||||
|
checked: trayState.showTrayTitle,
|
||||||
|
);
|
||||||
|
menuItems.add(speedStatistics);
|
||||||
|
}
|
||||||
menuItems.add(MenuItem.separator());
|
menuItems.add(MenuItem.separator());
|
||||||
for (final mode in Mode.values) {
|
for (final mode in Mode.values) {
|
||||||
menuItems.add(
|
menuItems.add(
|
||||||
@@ -85,13 +105,11 @@ class Tray {
|
|||||||
subMenuItems.add(
|
subMenuItems.add(
|
||||||
MenuItem.checkbox(
|
MenuItem.checkbox(
|
||||||
label: proxy.name,
|
label: proxy.name,
|
||||||
checked: trayState.selectedMap[group.name] == proxy.name,
|
checked:
|
||||||
|
globalState.getSelectedProxyName(group.name) == proxy.name,
|
||||||
onClick: (_) {
|
onClick: (_) {
|
||||||
final appController = globalState.appController;
|
final appController = globalState.appController;
|
||||||
appController.updateCurrentSelectedMap(
|
appController.updateCurrentSelectedMap(group.name, proxy.name);
|
||||||
group.name,
|
|
||||||
proxy.name,
|
|
||||||
);
|
|
||||||
appController.changeProxy(
|
appController.changeProxy(
|
||||||
groupName: group.name,
|
groupName: group.name,
|
||||||
proxyName: proxy.name,
|
proxyName: proxy.name,
|
||||||
@@ -103,9 +121,7 @@ class Tray {
|
|||||||
menuItems.add(
|
menuItems.add(
|
||||||
MenuItem.submenu(
|
MenuItem.submenu(
|
||||||
label: group.name,
|
label: group.name,
|
||||||
submenu: Menu(
|
submenu: Menu(items: subMenuItems),
|
||||||
items: subMenuItems,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -159,38 +175,41 @@ class Tray {
|
|||||||
menuItems.add(exitMenuItem);
|
menuItems.add(exitMenuItem);
|
||||||
final menu = Menu(items: menuItems);
|
final menu = Menu(items: menuItems);
|
||||||
await trayManager.setContextMenu(menu);
|
await trayManager.setContextMenu(menu);
|
||||||
if (Platform.isLinux) {
|
if (system.isLinux) {
|
||||||
await _updateSystemTray(
|
await _updateSystemTray(
|
||||||
brightness: trayState.brightness,
|
isStart: trayState.isStart,
|
||||||
|
tunEnable: trayState.tunEnable,
|
||||||
force: focus,
|
force: focus,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
updateTrayTitle(
|
||||||
|
showTrayTitle: trayState.showTrayTitle,
|
||||||
|
traffic: globalState.appState.traffics.list.safeLast(Traffic()),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> updateTrayTitle([Traffic? traffic]) async {
|
Future<void> updateTrayTitle({
|
||||||
// if (!system.isMacOS) {
|
required bool showTrayTitle,
|
||||||
// return;
|
required Traffic traffic,
|
||||||
// }
|
}) async {
|
||||||
// if (traffic == null) {
|
if (!system.isMacOS) {
|
||||||
// await trayManager.setTitle("");
|
return;
|
||||||
// } else {
|
}
|
||||||
// await trayManager.setTitle(
|
if (!showTrayTitle) {
|
||||||
// "${traffic.up.shortShow} ↑ \n${traffic.down.shortShow} ↓",
|
await trayManager.setTitle('');
|
||||||
// );
|
} else {
|
||||||
// }
|
await trayManager.setTitle(traffic.trayTitle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _copyEnv(int port) async {
|
Future<void> _copyEnv(int port) async {
|
||||||
final url = 'http://127.0.0.1:$port';
|
final url = 'http://127.0.0.1:$port';
|
||||||
|
|
||||||
final cmdline =
|
final cmdline = system.isWindows
|
||||||
system.isWindows ? 'set \$env:all_proxy=$url' : 'export all_proxy=$url';
|
? 'set \$env:all_proxy=$url'
|
||||||
|
: 'export all_proxy=$url';
|
||||||
|
|
||||||
await Clipboard.setData(
|
await Clipboard.setData(ClipboardData(text: cmdline));
|
||||||
ClipboardData(
|
|
||||||
text: cmdline,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,16 +142,9 @@ class Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getTrayIconPath({required Brightness brightness}) {
|
String get traySuffix {
|
||||||
if (system.isMacOS) {
|
|
||||||
return 'assets/images/icon_white.png';
|
|
||||||
}
|
|
||||||
final suffix = system.isWindows ? 'ico' : 'png';
|
final suffix = system.isWindows ? 'ico' : 'png';
|
||||||
return 'assets/images/icon.$suffix';
|
return 'assets/images/icon/status_2.$suffix';
|
||||||
// return switch (brightness) {
|
|
||||||
// Brightness.dark => "assets/images/icon_white.$suffix",
|
|
||||||
// Brightness.light => "assets/images/icon_black.$suffix",
|
|
||||||
// };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int compareVersions(String version1, String version2) {
|
int compareVersions(String version1, String version2) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:fl_clash/common/common.dart';
|
import 'package:fl_clash/common/common.dart';
|
||||||
|
import 'package:fl_clash/models/config.dart';
|
||||||
import 'package:fl_clash/state.dart';
|
import 'package:fl_clash/state.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:screen_retriever/screen_retriever.dart';
|
import 'package:screen_retriever/screen_retriever.dart';
|
||||||
@@ -19,13 +20,22 @@ class Window {
|
|||||||
protocol.register('flclash');
|
protocol.register('flclash');
|
||||||
}
|
}
|
||||||
await windowManager.ensureInitialized();
|
await windowManager.ensureInitialized();
|
||||||
|
// kDebugMode ? Size(680, 580) :
|
||||||
WindowOptions windowOptions = WindowOptions(
|
WindowOptions windowOptions = WindowOptions(
|
||||||
size: Size(props.width, props.height),
|
size: props.size,
|
||||||
minimumSize: const Size(380, 400),
|
minimumSize: const Size(380, 400),
|
||||||
);
|
);
|
||||||
if (!system.isMacOS || version > 10) {
|
if (!system.isMacOS || version > 10) {
|
||||||
await windowManager.setTitleBarStyle(TitleBarStyle.hidden);
|
await windowManager.setTitleBarStyle(TitleBarStyle.hidden);
|
||||||
}
|
}
|
||||||
|
await windowManager.setMaximizable(false);
|
||||||
|
await _windowPosition(props);
|
||||||
|
await windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||||
|
await windowManager.setPreventClose(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _windowPosition(WindowProps props) async {
|
||||||
if (!system.isMacOS) {
|
if (!system.isMacOS) {
|
||||||
final left = props.left ?? 0;
|
final left = props.left ?? 0;
|
||||||
final top = props.top ?? 0;
|
final top = props.top ?? 0;
|
||||||
@@ -50,9 +60,6 @@ class Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await windowManager.waitUntilReadyToShow(windowOptions, () async {
|
|
||||||
await windowManager.setPreventClose(true);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> show() async {
|
Future<void> show() async {
|
||||||
|
|||||||
18
lib/common/yaml.dart
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import 'package:yaml_writer/yaml_writer.dart';
|
||||||
|
|
||||||
|
class Yaml {
|
||||||
|
static Yaml? _instance;
|
||||||
|
|
||||||
|
Yaml._internal();
|
||||||
|
|
||||||
|
factory Yaml() {
|
||||||
|
_instance ??= Yaml._internal();
|
||||||
|
return _instance!;
|
||||||
|
}
|
||||||
|
|
||||||
|
String encode(Object? value) {
|
||||||
|
return YamlWriter().convert(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final yaml = Yaml();
|
||||||
@@ -22,8 +22,6 @@ import 'common/common.dart';
|
|||||||
import 'models/models.dart';
|
import 'models/models.dart';
|
||||||
|
|
||||||
class AppController {
|
class AppController {
|
||||||
int? lastProfileModified;
|
|
||||||
|
|
||||||
final BuildContext context;
|
final BuildContext context;
|
||||||
final WidgetRef _ref;
|
final WidgetRef _ref;
|
||||||
|
|
||||||
@@ -58,7 +56,11 @@ class AppController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void savePreferencesDebounce() {
|
void savePreferencesDebounce() {
|
||||||
debouncer.call(FunctionTag.savePreferences, savePreferences);
|
debouncer.call(
|
||||||
|
FunctionTag.savePreferences,
|
||||||
|
savePreferences,
|
||||||
|
duration: Duration(seconds: 3),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void changeProxyDebounce(String groupName, String proxyName) {
|
void changeProxyDebounce(String groupName, String proxyName) {
|
||||||
@@ -67,7 +69,7 @@ class AppController {
|
|||||||
String proxyName,
|
String proxyName,
|
||||||
) async {
|
) async {
|
||||||
await changeProxy(groupName: groupName, proxyName: proxyName);
|
await changeProxy(groupName: groupName, proxyName: proxyName);
|
||||||
await updateGroups();
|
updateGroupsDebounce();
|
||||||
}, args: [groupName, proxyName]);
|
}, args: [groupName, proxyName]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,14 +101,9 @@ class AppController {
|
|||||||
if (isStart) {
|
if (isStart) {
|
||||||
await globalState.appController.tryStartCore();
|
await globalState.appController.tryStartCore();
|
||||||
await globalState.handleStart([updateRunTime, updateTraffic]);
|
await globalState.handleStart([updateRunTime, updateTraffic]);
|
||||||
final currentLastModified = await _ref
|
final profileId = _ref.read(currentProfileIdProvider);
|
||||||
.read(currentProfileProvider)
|
final setupState = globalState.getSetupState(profileId);
|
||||||
?.profileLastModified;
|
if (!setupState.needSetup(globalState.lastSetupState)) {
|
||||||
if (currentLastModified == null || lastProfileModified == null) {
|
|
||||||
addCheckIpNumDebounce();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (currentLastModified <= (lastProfileModified ?? 0)) {
|
|
||||||
addCheckIpNumDebounce();
|
addCheckIpNumDebounce();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -313,9 +310,15 @@ class AppController {
|
|||||||
}
|
}
|
||||||
final realTunEnable = _ref.read(realTunEnableProvider);
|
final realTunEnable = _ref.read(realTunEnableProvider);
|
||||||
final realPatchConfig = patchConfig.copyWith.tun(enable: realTunEnable);
|
final realPatchConfig = patchConfig.copyWith.tun(enable: realTunEnable);
|
||||||
final message = await coreController.setupConfig(realPatchConfig);
|
final currentProfile = _ref.read(currentProfileProvider);
|
||||||
lastProfileModified = await _ref.read(
|
final setupState = _ref.read(setupStateProvider(currentProfile?.id ?? ''));
|
||||||
currentProfileProvider.select((state) => state?.profileLastModified),
|
globalState.lastSetupState = setupState;
|
||||||
|
if (system.isAndroid) {
|
||||||
|
globalState.lastVpnState = _ref.read(vpnStateProvider);
|
||||||
|
}
|
||||||
|
final message = await globalState.setupConfig(
|
||||||
|
setupState: setupState,
|
||||||
|
patchConfig: realPatchConfig,
|
||||||
);
|
);
|
||||||
if (message.isNotEmpty) {
|
if (message.isNotEmpty) {
|
||||||
throw message;
|
throw message;
|
||||||
@@ -373,6 +376,7 @@ class AppController {
|
|||||||
|
|
||||||
Future<void> updateGroups() async {
|
Future<void> updateGroups() async {
|
||||||
try {
|
try {
|
||||||
|
commonPrint.log('updateGroups');
|
||||||
_ref.read(groupsProvider.notifier).value = await retry(
|
_ref.read(groupsProvider.notifier).value = await retry(
|
||||||
task: () async {
|
task: () async {
|
||||||
final sortType = _ref.read(
|
final sortType = _ref.read(
|
||||||
@@ -449,15 +453,15 @@ class AppController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> handleExit() async {
|
Future<void> handleExit() async {
|
||||||
Future.delayed(commonDuration, () {
|
Future.delayed(Duration(seconds: 3), () {
|
||||||
system.exit();
|
system.exit();
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await savePreferences();
|
await savePreferences();
|
||||||
await macOS?.updateDns(true);
|
|
||||||
await proxy?.stopProxy();
|
await proxy?.stopProxy();
|
||||||
await coreController.shutdown();
|
await macOS?.updateDns(true);
|
||||||
await coreController.destroy();
|
await coreController.destroy();
|
||||||
|
commonPrint.log('exit');
|
||||||
} finally {
|
} finally {
|
||||||
system.exit();
|
system.exit();
|
||||||
}
|
}
|
||||||
@@ -477,7 +481,7 @@ class AppController {
|
|||||||
|
|
||||||
Future<void> checkUpdateResultHandle({
|
Future<void> checkUpdateResultHandle({
|
||||||
Map<String, dynamic>? data,
|
Map<String, dynamic>? data,
|
||||||
bool handleError = false,
|
bool isUser = false,
|
||||||
}) async {
|
}) async {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
final tagName = data['tag_name'];
|
final tagName = data['tag_name'];
|
||||||
@@ -496,12 +500,16 @@ class AppController {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
confirmText: appLocalizations.goDownload,
|
confirmText: appLocalizations.goDownload,
|
||||||
|
cancelText: isUser ? null : appLocalizations.noLongerRemind,
|
||||||
);
|
);
|
||||||
if (res != true) {
|
if (res == true) {
|
||||||
return;
|
launchUrl(Uri.parse('https://github.com/$repository/releases/latest'));
|
||||||
|
} else if (!isUser && res == false) {
|
||||||
|
_ref
|
||||||
|
.read(appSettingProvider.notifier)
|
||||||
|
.update((state) => state.copyWith(autoCheckUpdate: false));
|
||||||
}
|
}
|
||||||
launchUrl(Uri.parse('https://github.com/$repository/releases/latest'));
|
} else if (isUser) {
|
||||||
} else if (handleError) {
|
|
||||||
globalState.showMessage(
|
globalState.showMessage(
|
||||||
title: appLocalizations.checkUpdate,
|
title: appLocalizations.checkUpdate,
|
||||||
message: TextSpan(text: appLocalizations.checkUpdateError),
|
message: TextSpan(text: appLocalizations.checkUpdateError),
|
||||||
@@ -793,11 +801,17 @@ class AppController {
|
|||||||
updateStatus(!_ref.read(isStartProvider));
|
updateStatus(!_ref.read(isStartProvider));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void updateSpeedStatistics() {
|
||||||
|
_ref
|
||||||
|
.read(appSettingProvider.notifier)
|
||||||
|
.update((state) => state.copyWith(showTrayTitle: !state.showTrayTitle));
|
||||||
|
}
|
||||||
|
|
||||||
void updateCurrentSelectedMap(String groupName, String proxyName) {
|
void updateCurrentSelectedMap(String groupName, String proxyName) {
|
||||||
final currentProfile = _ref.read(currentProfileProvider);
|
final currentProfile = _ref.read(currentProfileProvider);
|
||||||
if (currentProfile != null &&
|
if (currentProfile != null &&
|
||||||
currentProfile.selectedMap[groupName] != proxyName) {
|
currentProfile.selectedMap[groupName] != proxyName) {
|
||||||
final SelectedMap selectedMap = Map.from(currentProfile.selectedMap)
|
final selectedMap = Map<String, String>.from(currentProfile.selectedMap)
|
||||||
..[groupName] = proxyName;
|
..[groupName] = proxyName;
|
||||||
_ref
|
_ref
|
||||||
.read(profilesProvider.notifier)
|
.read(profilesProvider.notifier)
|
||||||
@@ -902,7 +916,7 @@ class AppController {
|
|||||||
json.decode(utf8.decode(configFile.content)),
|
json.decode(utf8.decode(configFile.content)),
|
||||||
);
|
);
|
||||||
for (final profile in profiles) {
|
for (final profile in profiles) {
|
||||||
final filePath = join(homeDirPath, profile.name);
|
final filePath = join(homeDirPath, posix.normalize(profile.name));
|
||||||
final file = File(filePath);
|
final file = File(filePath);
|
||||||
await file.create(recursive: true);
|
await file.create(recursive: true);
|
||||||
await file.writeAsBytes(profile.content);
|
await file.writeAsBytes(profile.content);
|
||||||
@@ -949,14 +963,27 @@ class AppController {
|
|||||||
_ref.read(overrideDnsProvider.notifier).value = config.overrideDns;
|
_ref.read(overrideDnsProvider.notifier).value = config.overrideDns;
|
||||||
_ref.read(networkSettingProvider.notifier).value = config.networkProps;
|
_ref.read(networkSettingProvider.notifier).value = config.networkProps;
|
||||||
_ref.read(hotKeyActionsProvider.notifier).value = config.hotKeyActions;
|
_ref.read(hotKeyActionsProvider.notifier).value = config.hotKeyActions;
|
||||||
_ref.read(scriptStateProvider.notifier).value = config.scriptProps;
|
_ref.read(scriptsProvider.notifier).value = config.scripts;
|
||||||
|
_ref.read(rulesProvider.notifier).value = config.rules;
|
||||||
}
|
}
|
||||||
final currentProfile = _ref.read(currentProfileProvider);
|
final currentProfile = _ref.read(currentProfileProvider);
|
||||||
if (currentProfile == null) {
|
if (currentProfile == null && profiles.isNotEmpty) {
|
||||||
_ref.read(currentProfileIdProvider.notifier).value = profiles.first.id;
|
_ref.read(currentProfileIdProvider.notifier).value = profiles.first.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void checkNeedSetup() {
|
||||||
|
if (!globalState.isStart) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final profileId = _ref.read(currentProfileIdProvider);
|
||||||
|
final setupState = globalState.getSetupState(profileId);
|
||||||
|
if (!setupState.needSetup(globalState.lastSetupState)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setupClashConfigDebounce();
|
||||||
|
}
|
||||||
|
|
||||||
Future<T?> safeRun<T>(
|
Future<T?> safeRun<T>(
|
||||||
FutureOr<T> Function() futureFunction, {
|
FutureOr<T> Function() futureFunction, {
|
||||||
String? title,
|
String? title,
|
||||||
@@ -966,7 +993,7 @@ class AppController {
|
|||||||
final realSilence = needLoading == true ? true : silence;
|
final realSilence = needLoading == true ? true : silence;
|
||||||
try {
|
try {
|
||||||
if (needLoading) {
|
if (needLoading) {
|
||||||
_ref.read(loadingProvider.notifier).value = true;
|
_ref.read(loadingProvider.notifier).start();
|
||||||
}
|
}
|
||||||
final res = await futureFunction();
|
final res = await futureFunction();
|
||||||
return res;
|
return res;
|
||||||
@@ -982,7 +1009,7 @@ class AppController {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} finally {
|
} finally {
|
||||||
_ref.read(loadingProvider.notifier).value = false;
|
_ref.read(loadingProvider.notifier).stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,12 +93,11 @@ class CoreController {
|
|||||||
return await _interface.updateConfig(updateParams);
|
return await _interface.updateConfig(updateParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> setupConfig(
|
Future<String> setupConfig({
|
||||||
ClashConfig clashConfig, {
|
required SetupParams params,
|
||||||
|
required SetupState setupState,
|
||||||
VoidCallback? preloadInvoke,
|
VoidCallback? preloadInvoke,
|
||||||
}) async {
|
}) async {
|
||||||
await globalState.genConfigFile(clashConfig);
|
|
||||||
final params = await globalState.getSetupParams();
|
|
||||||
final res = _interface.setupConfig(params);
|
final res = _interface.setupConfig(params);
|
||||||
if (preloadInvoke != null) {
|
if (preloadInvoke != null) {
|
||||||
preloadInvoke();
|
preloadInvoke();
|
||||||
@@ -109,7 +108,7 @@ class CoreController {
|
|||||||
Future<List<Group>> getProxiesGroups({
|
Future<List<Group>> getProxiesGroups({
|
||||||
required ProxiesSortType sortType,
|
required ProxiesSortType sortType,
|
||||||
required DelayMap delayMap,
|
required DelayMap delayMap,
|
||||||
required SelectedMap selectedMap,
|
required Map<String, String> selectedMap,
|
||||||
required String defaultTestUrl,
|
required String defaultTestUrl,
|
||||||
}) async {
|
}) async {
|
||||||
final proxies = await _interface.getProxies();
|
final proxies = await _interface.getProxies();
|
||||||
|
|||||||
@@ -86,7 +86,15 @@ abstract class CoreHandlerInterface with CoreInterface {
|
|||||||
dynamic data,
|
dynamic data,
|
||||||
Duration? timeout,
|
Duration? timeout,
|
||||||
}) async {
|
}) async {
|
||||||
await completer.future;
|
try {
|
||||||
|
await completer.future.timeout(const Duration(seconds: 10));
|
||||||
|
} catch (e) {
|
||||||
|
commonPrint.log(
|
||||||
|
'Invoke pre ${method.name} timeout $e',
|
||||||
|
logLevel: LogLevel.error,
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
commonPrint.log('Invoke ${method.name} ${DateTime.now()} $data');
|
commonPrint.log('Invoke ${method.name} ${DateTime.now()} $data');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ class CoreService extends CoreHandlerInterface {
|
|||||||
@override
|
@override
|
||||||
destroy() async {
|
destroy() async {
|
||||||
final server = await _serverCompleter.future;
|
final server = await _serverCompleter.future;
|
||||||
|
await shutdown();
|
||||||
await server.close();
|
await server.close();
|
||||||
await _deleteSocketFile();
|
await _deleteSocketFile();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ extension KeyboardModifierExt on KeyboardModifier {
|
|||||||
|
|
||||||
enum HotAction { start, view, mode, proxy, tun }
|
enum HotAction { start, view, mode, proxy, tun }
|
||||||
|
|
||||||
enum ProxiesIconStyle { standard, none, icon }
|
enum ProxiesIconStyle { none, standard, icon }
|
||||||
|
|
||||||
enum FontFamily {
|
enum FontFamily {
|
||||||
twEmoji('Twemoji'),
|
twEmoji('Twemoji'),
|
||||||
@@ -280,6 +280,7 @@ enum FunctionTag {
|
|||||||
logs,
|
logs,
|
||||||
requests,
|
requests,
|
||||||
autoScrollToEnd,
|
autoScrollToEnd,
|
||||||
|
loadedProvider,
|
||||||
}
|
}
|
||||||
|
|
||||||
enum DashboardWidget {
|
enum DashboardWidget {
|
||||||
@@ -368,6 +369,18 @@ enum RuleAction {
|
|||||||
final String value;
|
final String value;
|
||||||
|
|
||||||
const RuleAction(this.value);
|
const RuleAction(this.value);
|
||||||
|
|
||||||
|
static List<RuleAction> get addedRuleActions {
|
||||||
|
return RuleAction.values
|
||||||
|
.where(
|
||||||
|
(item) => ![
|
||||||
|
RuleAction.MATCH,
|
||||||
|
RuleAction.RULE_SET,
|
||||||
|
RuleAction.SUB_RULE,
|
||||||
|
].contains(item),
|
||||||
|
)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension RuleActionExt on RuleAction {
|
extension RuleActionExt on RuleAction {
|
||||||
@@ -384,18 +397,25 @@ extension RuleActionExt on RuleAction {
|
|||||||
|
|
||||||
enum OverrideRuleType { override, added }
|
enum OverrideRuleType { override, added }
|
||||||
|
|
||||||
enum RuleTarget { DIRECT, REJECT }
|
enum OverwriteType {
|
||||||
|
// none,
|
||||||
|
standard,
|
||||||
|
script,
|
||||||
|
// custom,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum RuleTarget { DIRECT, REJECT, MATCH }
|
||||||
|
|
||||||
enum RecoveryStrategy { compatible, override }
|
enum RecoveryStrategy { compatible, override }
|
||||||
|
|
||||||
enum CacheTag { logs, rules, requests, proxiesList }
|
enum CacheTag { logs, rules, requests, proxiesList }
|
||||||
|
|
||||||
enum Language { yaml, javaScript }
|
enum Language { yaml, javaScript, json }
|
||||||
|
|
||||||
enum ImportOption { file, url }
|
enum ImportOption { file, url }
|
||||||
|
|
||||||
enum ScrollPositionCacheKey { tools, profiles, proxiesList, proxiesTabList }
|
enum ScrollPositionCacheKey { tools, profiles, proxiesList, proxiesTabList }
|
||||||
|
|
||||||
enum QueryTag { proxies }
|
enum QueryTag { proxies, access }
|
||||||
|
|
||||||
enum CoreStatus { connecting, connected, disconnected }
|
enum CoreStatus { connecting, connected, disconnected }
|
||||||
|
|||||||
1
lib/features/features.dart
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export 'overwrite/overwrite.dart';
|
||||||
1
lib/features/overwrite/overwrite.dart
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export 'rule.dart';
|
||||||
303
lib/features/overwrite/rule.dart
Normal file
@@ -0,0 +1,303 @@
|
|||||||
|
library;
|
||||||
|
|
||||||
|
import 'package:fl_clash/common/common.dart';
|
||||||
|
import 'package:fl_clash/enum/enum.dart';
|
||||||
|
import 'package:fl_clash/models/clash_config.dart';
|
||||||
|
import 'package:fl_clash/state.dart';
|
||||||
|
import 'package:fl_clash/widgets/card.dart';
|
||||||
|
import 'package:fl_clash/widgets/dialog.dart';
|
||||||
|
import 'package:fl_clash/widgets/input.dart';
|
||||||
|
import 'package:fl_clash/widgets/list.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class RuleItem extends StatelessWidget {
|
||||||
|
final bool isSelected;
|
||||||
|
final bool isEditing;
|
||||||
|
final Rule rule;
|
||||||
|
final void Function(String id) onSelected;
|
||||||
|
final void Function(Rule rule) onEdit;
|
||||||
|
|
||||||
|
const RuleItem({
|
||||||
|
super.key,
|
||||||
|
required this.isSelected,
|
||||||
|
required this.rule,
|
||||||
|
required this.onSelected,
|
||||||
|
required this.onEdit,
|
||||||
|
this.isEditing = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CommonSelectedListItem(
|
||||||
|
isSelected: isSelected,
|
||||||
|
onSelected: () {
|
||||||
|
onSelected(rule.id);
|
||||||
|
},
|
||||||
|
title: Text(
|
||||||
|
rule.value,
|
||||||
|
style: context.textTheme.bodyMedium?.toJetBrainsMono,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
onEdit(rule);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RuleStatusItem extends StatelessWidget {
|
||||||
|
final bool status;
|
||||||
|
final Rule rule;
|
||||||
|
final void Function(bool) onChange;
|
||||||
|
|
||||||
|
const RuleStatusItem({
|
||||||
|
super.key,
|
||||||
|
required this.status,
|
||||||
|
required this.rule,
|
||||||
|
required this.onChange,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 4),
|
||||||
|
child: CommonCard(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
radius: 18,
|
||||||
|
type: CommonCardType.filled,
|
||||||
|
onPressed: () {
|
||||||
|
onChange(!status);
|
||||||
|
},
|
||||||
|
child: ListTile(
|
||||||
|
minTileHeight: 0,
|
||||||
|
minVerticalPadding: 0,
|
||||||
|
titleTextStyle: context.textTheme.bodyMedium?.toJetBrainsMono,
|
||||||
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 16,
|
||||||
|
vertical: 16,
|
||||||
|
),
|
||||||
|
trailing: Switch(value: status, onChanged: onChange),
|
||||||
|
title: Text(rule.value),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AddOrEditRuleDialog extends StatefulWidget {
|
||||||
|
final Rule? rule;
|
||||||
|
|
||||||
|
const AddOrEditRuleDialog({super.key, this.rule});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AddOrEditRuleDialog> createState() => _AddOrEditRuleDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddOrEditRuleDialogState extends State<AddOrEditRuleDialog> {
|
||||||
|
late RuleAction _ruleAction;
|
||||||
|
final _ruleTargetController = TextEditingController();
|
||||||
|
final _contentController = TextEditingController();
|
||||||
|
bool _noResolve = false;
|
||||||
|
bool _src = false;
|
||||||
|
List<DropdownMenuEntry> _targetItems = [];
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_initState();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _initState() {
|
||||||
|
_targetItems = [
|
||||||
|
...RuleTarget.values.map(
|
||||||
|
(item) => DropdownMenuEntry(value: item.name, label: item.name),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
if (widget.rule != null) {
|
||||||
|
final parsedRule = ParsedRule.parseString(widget.rule!.value);
|
||||||
|
_ruleAction = parsedRule.ruleAction;
|
||||||
|
_contentController.text = parsedRule.content ?? '';
|
||||||
|
_ruleTargetController.text = parsedRule.ruleTarget ?? '';
|
||||||
|
_noResolve = parsedRule.noResolve;
|
||||||
|
_src = parsedRule.src;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_ruleAction = RuleAction.addedRuleActions.first;
|
||||||
|
if (_targetItems.isNotEmpty) {
|
||||||
|
_ruleTargetController.text = _targetItems.first.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didUpdateWidget(AddOrEditRuleDialog oldWidget) {
|
||||||
|
super.didUpdateWidget(oldWidget);
|
||||||
|
if (oldWidget.rule != widget.rule) {
|
||||||
|
_initState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handleSubmit() {
|
||||||
|
final res = _formKey.currentState?.validate();
|
||||||
|
if (res == false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final parsedRule = ParsedRule(
|
||||||
|
ruleAction: _ruleAction,
|
||||||
|
content: _contentController.text,
|
||||||
|
ruleTarget: _ruleTargetController.text,
|
||||||
|
noResolve: _noResolve,
|
||||||
|
src: _src,
|
||||||
|
);
|
||||||
|
final rule = widget.rule != null
|
||||||
|
? widget.rule!.copyWith(value: parsedRule.value)
|
||||||
|
: Rule.value(parsedRule.value);
|
||||||
|
Navigator.of(context).pop(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CommonDialog(
|
||||||
|
title: widget.rule != null
|
||||||
|
? appLocalizations.editRule
|
||||||
|
: appLocalizations.addRule,
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: _handleSubmit,
|
||||||
|
child: Text(appLocalizations.confirm),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
child: DropdownMenuTheme(
|
||||||
|
data: DropdownMenuThemeData(
|
||||||
|
inputDecorationTheme: InputDecorationTheme(
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
labelStyle: context.textTheme.bodyLarge?.copyWith(
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Form(
|
||||||
|
key: _formKey,
|
||||||
|
child: LayoutBuilder(
|
||||||
|
builder: (_, constraints) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
FilledButton.tonal(
|
||||||
|
onPressed: () async {
|
||||||
|
_ruleAction =
|
||||||
|
await globalState.showCommonDialog<RuleAction>(
|
||||||
|
filter: false,
|
||||||
|
child: OptionsDialog<RuleAction>(
|
||||||
|
title: appLocalizations.ruleName,
|
||||||
|
options: RuleAction.addedRuleActions,
|
||||||
|
textBuilder: (item) => item.value,
|
||||||
|
value: _ruleAction,
|
||||||
|
),
|
||||||
|
) ??
|
||||||
|
_ruleAction;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
child: Text(_ruleAction.value),
|
||||||
|
),
|
||||||
|
SizedBox(height: 24),
|
||||||
|
TextFormField(
|
||||||
|
keyboardType: TextInputType.text,
|
||||||
|
onFieldSubmitted: (_) {
|
||||||
|
_handleSubmit();
|
||||||
|
},
|
||||||
|
controller: _contentController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
border: const OutlineInputBorder(),
|
||||||
|
labelText: appLocalizations.content,
|
||||||
|
),
|
||||||
|
validator: (_) {
|
||||||
|
if (_contentController.text.isEmpty) {
|
||||||
|
return appLocalizations.emptyTip(
|
||||||
|
appLocalizations.content,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(height: 24),
|
||||||
|
FormField<String>(
|
||||||
|
validator: (_) {
|
||||||
|
if (_ruleTargetController.text.isEmpty) {
|
||||||
|
return appLocalizations.emptyTip(
|
||||||
|
appLocalizations.ruleTarget,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
builder: (filed) {
|
||||||
|
return DropdownMenu(
|
||||||
|
controller: _ruleTargetController,
|
||||||
|
label: Text(appLocalizations.ruleTarget),
|
||||||
|
width: 200,
|
||||||
|
menuHeight: 250,
|
||||||
|
enableFilter: false,
|
||||||
|
enableSearch: false,
|
||||||
|
dropdownMenuEntries: _targetItems,
|
||||||
|
errorText: filed.errorText,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
if (_ruleAction.hasParams) ...[
|
||||||
|
SizedBox(height: 20),
|
||||||
|
Wrap(
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
CommonCard(
|
||||||
|
radius: 8,
|
||||||
|
isSelected: _src,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 8,
|
||||||
|
vertical: 8,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
appLocalizations.sourceIp,
|
||||||
|
style: context.textTheme.bodyMedium,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_src = !_src;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
CommonCard(
|
||||||
|
radius: 8,
|
||||||
|
isSelected: _noResolve,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 8,
|
||||||
|
vertical: 8,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
appLocalizations.noResolve,
|
||||||
|
style: context.textTheme.bodyMedium,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_noResolve = !_noResolve;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
SizedBox(height: 20),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,27 +20,42 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
|
|||||||
class MessageLookup extends MessageLookupByLibrary {
|
class MessageLookup extends MessageLookupByLibrary {
|
||||||
String get localeName => 'en';
|
String get localeName => 'en';
|
||||||
|
|
||||||
static String m0(label) =>
|
static String m0(count) =>
|
||||||
"Are you sure you want to delete the selected ${label}?";
|
"${Intl.plural(count, one: '1 day ago', other: '${count} days ago')}";
|
||||||
|
|
||||||
static String m1(label) =>
|
static String m1(label) =>
|
||||||
|
"Are you sure you want to delete the selected ${label}?";
|
||||||
|
|
||||||
|
static String m2(label) =>
|
||||||
"Are you sure you want to delete the current ${label}?";
|
"Are you sure you want to delete the current ${label}?";
|
||||||
|
|
||||||
static String m2(label) => "${label} details";
|
static String m3(label) => "${label} details";
|
||||||
|
|
||||||
static String m3(label) => "${label} cannot be empty";
|
static String m4(label) => "${label} cannot be empty";
|
||||||
|
|
||||||
static String m4(label) => "Current ${label} already exists";
|
static String m5(label) => "Current ${label} already exists";
|
||||||
|
|
||||||
static String m5(label) => "No ${label} at the moment";
|
static String m6(count) =>
|
||||||
|
"${Intl.plural(count, one: '1 hour ago', other: '${count} hours ago')}";
|
||||||
|
|
||||||
static String m6(label) => "${label} must be a number";
|
static String m7(count) =>
|
||||||
|
"${Intl.plural(count, one: '1 minute ago', other: '${count} minutes ago')}";
|
||||||
|
|
||||||
static String m7(label) => "${label} must be between 1024 and 49151";
|
static String m8(count) =>
|
||||||
|
"${Intl.plural(count, one: '1 month ago', other: '${count} months ago')}";
|
||||||
|
|
||||||
static String m8(count) => "${count} items have been selected";
|
static String m9(label) => "No ${label} yet";
|
||||||
|
|
||||||
static String m9(label) => "${label} must be a url";
|
static String m10(label) => "${label} must be a number";
|
||||||
|
|
||||||
|
static String m11(label) => "${label} must be between 1024 and 49151";
|
||||||
|
|
||||||
|
static String m12(count) => "${count} items have been selected";
|
||||||
|
|
||||||
|
static String m13(label) => "${label} must be a url";
|
||||||
|
|
||||||
|
static String m14(count) =>
|
||||||
|
"${Intl.plural(count, one: '1 year ago', other: '${count} years ago')}";
|
||||||
|
|
||||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
||||||
@@ -55,6 +70,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"accessControlNotAllowDesc": MessageLookupByLibrary.simpleMessage(
|
"accessControlNotAllowDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"The selected application will be excluded from VPN",
|
"The selected application will be excluded from VPN",
|
||||||
),
|
),
|
||||||
|
"accessControlSettings": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Access Control Settings",
|
||||||
|
),
|
||||||
"account": MessageLookupByLibrary.simpleMessage("Account"),
|
"account": MessageLookupByLibrary.simpleMessage("Account"),
|
||||||
"action": MessageLookupByLibrary.simpleMessage("Action"),
|
"action": MessageLookupByLibrary.simpleMessage("Action"),
|
||||||
"action_mode": MessageLookupByLibrary.simpleMessage("Switch mode"),
|
"action_mode": MessageLookupByLibrary.simpleMessage("Switch mode"),
|
||||||
@@ -67,6 +85,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"addedOriginRules": MessageLookupByLibrary.simpleMessage(
|
"addedOriginRules": MessageLookupByLibrary.simpleMessage(
|
||||||
"Attach on the original rules",
|
"Attach on the original rules",
|
||||||
),
|
),
|
||||||
|
"addedRules": MessageLookupByLibrary.simpleMessage("Added rules"),
|
||||||
"address": MessageLookupByLibrary.simpleMessage("Address"),
|
"address": MessageLookupByLibrary.simpleMessage("Address"),
|
||||||
"addressHelp": MessageLookupByLibrary.simpleMessage(
|
"addressHelp": MessageLookupByLibrary.simpleMessage(
|
||||||
"WebDAV server address",
|
"WebDAV server address",
|
||||||
@@ -80,6 +99,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"adminAutoLaunchDesc": MessageLookupByLibrary.simpleMessage(
|
"adminAutoLaunchDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Boot up by using admin mode",
|
"Boot up by using admin mode",
|
||||||
),
|
),
|
||||||
|
"advancedConfig": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Advanced configuration",
|
||||||
|
),
|
||||||
|
"advancedConfigDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Provide diverse configuration options",
|
||||||
|
),
|
||||||
"ago": MessageLookupByLibrary.simpleMessage(" Ago"),
|
"ago": MessageLookupByLibrary.simpleMessage(" Ago"),
|
||||||
"agree": MessageLookupByLibrary.simpleMessage("Agree"),
|
"agree": MessageLookupByLibrary.simpleMessage("Agree"),
|
||||||
"allApps": MessageLookupByLibrary.simpleMessage("All apps"),
|
"allApps": MessageLookupByLibrary.simpleMessage("All apps"),
|
||||||
@@ -183,6 +208,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Opening it will lose part of its application ability and gain the support of full amount of Clash.",
|
"Opening it will lose part of its application ability and gain the support of full amount of Clash.",
|
||||||
),
|
),
|
||||||
"confirm": MessageLookupByLibrary.simpleMessage("Confirm"),
|
"confirm": MessageLookupByLibrary.simpleMessage("Confirm"),
|
||||||
|
"confirmClearAllData": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Are you sure you want to clear all data?",
|
||||||
|
),
|
||||||
|
"confirmForceCrashCore": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Are you sure you want to force crash the core?",
|
||||||
|
),
|
||||||
"connected": MessageLookupByLibrary.simpleMessage("Connected"),
|
"connected": MessageLookupByLibrary.simpleMessage("Connected"),
|
||||||
"connecting": MessageLookupByLibrary.simpleMessage("Connecting..."),
|
"connecting": MessageLookupByLibrary.simpleMessage("Connecting..."),
|
||||||
"connection": MessageLookupByLibrary.simpleMessage("Connection"),
|
"connection": MessageLookupByLibrary.simpleMessage("Connection"),
|
||||||
@@ -194,6 +225,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"contactMe": MessageLookupByLibrary.simpleMessage("Contact me"),
|
"contactMe": MessageLookupByLibrary.simpleMessage("Contact me"),
|
||||||
"content": MessageLookupByLibrary.simpleMessage("Content"),
|
"content": MessageLookupByLibrary.simpleMessage("Content"),
|
||||||
"contentScheme": MessageLookupByLibrary.simpleMessage("Content"),
|
"contentScheme": MessageLookupByLibrary.simpleMessage("Content"),
|
||||||
|
"controlGlobalAddedRules": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Control global added rules",
|
||||||
|
),
|
||||||
"copy": MessageLookupByLibrary.simpleMessage("Copy"),
|
"copy": MessageLookupByLibrary.simpleMessage("Copy"),
|
||||||
"copyEnvVar": MessageLookupByLibrary.simpleMessage(
|
"copyEnvVar": MessageLookupByLibrary.simpleMessage(
|
||||||
"Copying environment variables",
|
"Copying environment variables",
|
||||||
@@ -201,6 +235,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"copyLink": MessageLookupByLibrary.simpleMessage("Copy link"),
|
"copyLink": MessageLookupByLibrary.simpleMessage("Copy link"),
|
||||||
"copySuccess": MessageLookupByLibrary.simpleMessage("Copy success"),
|
"copySuccess": MessageLookupByLibrary.simpleMessage("Copy success"),
|
||||||
"core": MessageLookupByLibrary.simpleMessage("Core"),
|
"core": MessageLookupByLibrary.simpleMessage("Core"),
|
||||||
|
"coreConfigChangeDetected": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Core configuration change detected",
|
||||||
|
),
|
||||||
"coreInfo": MessageLookupByLibrary.simpleMessage("Core info"),
|
"coreInfo": MessageLookupByLibrary.simpleMessage("Core info"),
|
||||||
"coreStatus": MessageLookupByLibrary.simpleMessage("Core status"),
|
"coreStatus": MessageLookupByLibrary.simpleMessage("Core status"),
|
||||||
"country": MessageLookupByLibrary.simpleMessage("Country"),
|
"country": MessageLookupByLibrary.simpleMessage("Country"),
|
||||||
@@ -221,6 +258,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Data Collection Notice",
|
"Data Collection Notice",
|
||||||
),
|
),
|
||||||
"days": MessageLookupByLibrary.simpleMessage("Days"),
|
"days": MessageLookupByLibrary.simpleMessage("Days"),
|
||||||
|
"daysAgo": m0,
|
||||||
"defaultNameserver": MessageLookupByLibrary.simpleMessage(
|
"defaultNameserver": MessageLookupByLibrary.simpleMessage(
|
||||||
"Default nameserver",
|
"Default nameserver",
|
||||||
),
|
),
|
||||||
@@ -232,8 +270,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"delay": MessageLookupByLibrary.simpleMessage("Delay"),
|
"delay": MessageLookupByLibrary.simpleMessage("Delay"),
|
||||||
"delaySort": MessageLookupByLibrary.simpleMessage("Sort by delay"),
|
"delaySort": MessageLookupByLibrary.simpleMessage("Sort by delay"),
|
||||||
"delete": MessageLookupByLibrary.simpleMessage("Delete"),
|
"delete": MessageLookupByLibrary.simpleMessage("Delete"),
|
||||||
"deleteMultipTip": m0,
|
"deleteMultipTip": m1,
|
||||||
"deleteTip": m1,
|
"deleteTip": m2,
|
||||||
"desc": MessageLookupByLibrary.simpleMessage(
|
"desc": MessageLookupByLibrary.simpleMessage(
|
||||||
"A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.",
|
"A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.",
|
||||||
),
|
),
|
||||||
@@ -244,7 +282,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"destinationIPASN": MessageLookupByLibrary.simpleMessage(
|
"destinationIPASN": MessageLookupByLibrary.simpleMessage(
|
||||||
"Destination IPASN",
|
"Destination IPASN",
|
||||||
),
|
),
|
||||||
"details": m2,
|
"details": m3,
|
||||||
"detectionTip": MessageLookupByLibrary.simpleMessage(
|
"detectionTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"Relying on third-party api is for reference only",
|
"Relying on third-party api is for reference only",
|
||||||
),
|
),
|
||||||
@@ -275,7 +313,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"domain": MessageLookupByLibrary.simpleMessage("Domain"),
|
"domain": MessageLookupByLibrary.simpleMessage("Domain"),
|
||||||
"download": MessageLookupByLibrary.simpleMessage("Download"),
|
"download": MessageLookupByLibrary.simpleMessage("Download"),
|
||||||
"edit": MessageLookupByLibrary.simpleMessage("Edit"),
|
"edit": MessageLookupByLibrary.simpleMessage("Edit"),
|
||||||
"emptyTip": m3,
|
"editGlobalRules": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Edit global rules",
|
||||||
|
),
|
||||||
|
"editRule": MessageLookupByLibrary.simpleMessage("Edit rule"),
|
||||||
|
"emptyTip": m4,
|
||||||
"en": MessageLookupByLibrary.simpleMessage("English"),
|
"en": MessageLookupByLibrary.simpleMessage("English"),
|
||||||
"enableOverride": MessageLookupByLibrary.simpleMessage("Enable override"),
|
"enableOverride": MessageLookupByLibrary.simpleMessage("Enable override"),
|
||||||
"entries": MessageLookupByLibrary.simpleMessage(" entries"),
|
"entries": MessageLookupByLibrary.simpleMessage(" entries"),
|
||||||
@@ -283,7 +325,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"excludeDesc": MessageLookupByLibrary.simpleMessage(
|
"excludeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"When the app is in the background, the app is hidden from the recent task",
|
"When the app is in the background, the app is hidden from the recent task",
|
||||||
),
|
),
|
||||||
"existsTip": m4,
|
"existsTip": m5,
|
||||||
"exit": MessageLookupByLibrary.simpleMessage("Exit"),
|
"exit": MessageLookupByLibrary.simpleMessage("Exit"),
|
||||||
"expand": MessageLookupByLibrary.simpleMessage("Standard"),
|
"expand": MessageLookupByLibrary.simpleMessage("Standard"),
|
||||||
"expirationTime": MessageLookupByLibrary.simpleMessage("Expiration time"),
|
"expirationTime": MessageLookupByLibrary.simpleMessage("Expiration time"),
|
||||||
@@ -297,6 +339,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"externalControllerDesc": MessageLookupByLibrary.simpleMessage(
|
"externalControllerDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Once enabled, the Clash kernel can be controlled on port 9090",
|
"Once enabled, the Clash kernel can be controlled on port 9090",
|
||||||
),
|
),
|
||||||
|
"externalFetch": MessageLookupByLibrary.simpleMessage("External fetch"),
|
||||||
"externalLink": MessageLookupByLibrary.simpleMessage("External link"),
|
"externalLink": MessageLookupByLibrary.simpleMessage("External link"),
|
||||||
"externalResources": MessageLookupByLibrary.simpleMessage(
|
"externalResources": MessageLookupByLibrary.simpleMessage(
|
||||||
"External resources",
|
"External resources",
|
||||||
@@ -345,6 +388,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"global": MessageLookupByLibrary.simpleMessage("Global"),
|
"global": MessageLookupByLibrary.simpleMessage("Global"),
|
||||||
"go": MessageLookupByLibrary.simpleMessage("Go"),
|
"go": MessageLookupByLibrary.simpleMessage("Go"),
|
||||||
"goDownload": MessageLookupByLibrary.simpleMessage("Go to download"),
|
"goDownload": MessageLookupByLibrary.simpleMessage("Go to download"),
|
||||||
|
"goToConfigureScript": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Go to configure script",
|
||||||
|
),
|
||||||
"hasCacheChange": MessageLookupByLibrary.simpleMessage(
|
"hasCacheChange": MessageLookupByLibrary.simpleMessage(
|
||||||
"Do you want to cache the changes?",
|
"Do you want to cache the changes?",
|
||||||
),
|
),
|
||||||
@@ -358,6 +404,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Use keyboard to control applications",
|
"Use keyboard to control applications",
|
||||||
),
|
),
|
||||||
"hours": MessageLookupByLibrary.simpleMessage("Hours"),
|
"hours": MessageLookupByLibrary.simpleMessage("Hours"),
|
||||||
|
"hoursAgo": m6,
|
||||||
"icon": MessageLookupByLibrary.simpleMessage("Icon"),
|
"icon": MessageLookupByLibrary.simpleMessage("Icon"),
|
||||||
"iconConfiguration": MessageLookupByLibrary.simpleMessage(
|
"iconConfiguration": MessageLookupByLibrary.simpleMessage(
|
||||||
"Icon configuration",
|
"Icon configuration",
|
||||||
@@ -387,6 +434,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
),
|
),
|
||||||
"ja": MessageLookupByLibrary.simpleMessage("Japanese"),
|
"ja": MessageLookupByLibrary.simpleMessage("Japanese"),
|
||||||
"just": MessageLookupByLibrary.simpleMessage("Just"),
|
"just": MessageLookupByLibrary.simpleMessage("Just"),
|
||||||
|
"justNow": MessageLookupByLibrary.simpleMessage("Just now"),
|
||||||
"keepAliveIntervalDesc": MessageLookupByLibrary.simpleMessage(
|
"keepAliveIntervalDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Tcp keep alive interval",
|
"Tcp keep alive interval",
|
||||||
),
|
),
|
||||||
@@ -396,6 +444,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"light": MessageLookupByLibrary.simpleMessage("Light"),
|
"light": MessageLookupByLibrary.simpleMessage("Light"),
|
||||||
"list": MessageLookupByLibrary.simpleMessage("List"),
|
"list": MessageLookupByLibrary.simpleMessage("List"),
|
||||||
"listen": MessageLookupByLibrary.simpleMessage("Listen"),
|
"listen": MessageLookupByLibrary.simpleMessage("Listen"),
|
||||||
|
"loadTest": MessageLookupByLibrary.simpleMessage("Load test"),
|
||||||
|
"loading": MessageLookupByLibrary.simpleMessage("Loading..."),
|
||||||
"local": MessageLookupByLibrary.simpleMessage("Local"),
|
"local": MessageLookupByLibrary.simpleMessage("Local"),
|
||||||
"localBackupDesc": MessageLookupByLibrary.simpleMessage(
|
"localBackupDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Backup local data to local",
|
"Backup local data to local",
|
||||||
@@ -428,10 +478,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Modify the default system exit event",
|
"Modify the default system exit event",
|
||||||
),
|
),
|
||||||
"minutes": MessageLookupByLibrary.simpleMessage("Minutes"),
|
"minutes": MessageLookupByLibrary.simpleMessage("Minutes"),
|
||||||
|
"minutesAgo": m7,
|
||||||
"mixedPort": MessageLookupByLibrary.simpleMessage("Mixed Port"),
|
"mixedPort": MessageLookupByLibrary.simpleMessage("Mixed Port"),
|
||||||
"mode": MessageLookupByLibrary.simpleMessage("Mode"),
|
"mode": MessageLookupByLibrary.simpleMessage("Mode"),
|
||||||
"monochromeScheme": MessageLookupByLibrary.simpleMessage("Monochrome"),
|
"monochromeScheme": MessageLookupByLibrary.simpleMessage("Monochrome"),
|
||||||
"months": MessageLookupByLibrary.simpleMessage("Months"),
|
"months": MessageLookupByLibrary.simpleMessage("Months"),
|
||||||
|
"monthsAgo": m8,
|
||||||
"more": MessageLookupByLibrary.simpleMessage("More"),
|
"more": MessageLookupByLibrary.simpleMessage("More"),
|
||||||
"name": MessageLookupByLibrary.simpleMessage("Name"),
|
"name": MessageLookupByLibrary.simpleMessage("Name"),
|
||||||
"nameSort": MessageLookupByLibrary.simpleMessage("Sort by name"),
|
"nameSort": MessageLookupByLibrary.simpleMessage("Sort by name"),
|
||||||
@@ -459,6 +511,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"noHotKey": MessageLookupByLibrary.simpleMessage("No HotKey"),
|
"noHotKey": MessageLookupByLibrary.simpleMessage("No HotKey"),
|
||||||
"noIcon": MessageLookupByLibrary.simpleMessage("None"),
|
"noIcon": MessageLookupByLibrary.simpleMessage("None"),
|
||||||
"noInfo": MessageLookupByLibrary.simpleMessage("No info"),
|
"noInfo": MessageLookupByLibrary.simpleMessage("No info"),
|
||||||
|
"noLongerRemind": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Don\'t remind again",
|
||||||
|
),
|
||||||
"noMoreInfoDesc": MessageLookupByLibrary.simpleMessage("No more info"),
|
"noMoreInfoDesc": MessageLookupByLibrary.simpleMessage("No more info"),
|
||||||
"noNetwork": MessageLookupByLibrary.simpleMessage("No network"),
|
"noNetwork": MessageLookupByLibrary.simpleMessage("No network"),
|
||||||
"noNetworkApp": MessageLookupByLibrary.simpleMessage("No network APP"),
|
"noNetworkApp": MessageLookupByLibrary.simpleMessage("No network APP"),
|
||||||
@@ -474,8 +529,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"nullProfileDesc": MessageLookupByLibrary.simpleMessage(
|
"nullProfileDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"No profile, Please add a profile",
|
"No profile, Please add a profile",
|
||||||
),
|
),
|
||||||
"nullTip": m5,
|
"nullTip": m9,
|
||||||
"numberTip": m6,
|
"numberTip": m10,
|
||||||
"oneColumn": MessageLookupByLibrary.simpleMessage("One column"),
|
"oneColumn": MessageLookupByLibrary.simpleMessage("One column"),
|
||||||
"onlyIcon": MessageLookupByLibrary.simpleMessage("Icon"),
|
"onlyIcon": MessageLookupByLibrary.simpleMessage("Icon"),
|
||||||
"onlyOtherApps": MessageLookupByLibrary.simpleMessage(
|
"onlyOtherApps": MessageLookupByLibrary.simpleMessage(
|
||||||
@@ -504,9 +559,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"overrideInvalidTip": MessageLookupByLibrary.simpleMessage(
|
"overrideInvalidTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"Does not take effect in script mode",
|
"Does not take effect in script mode",
|
||||||
),
|
),
|
||||||
|
"overrideMode": MessageLookupByLibrary.simpleMessage("Override mode"),
|
||||||
"overrideOriginRules": MessageLookupByLibrary.simpleMessage(
|
"overrideOriginRules": MessageLookupByLibrary.simpleMessage(
|
||||||
"Override the original rule",
|
"Override the original rule",
|
||||||
),
|
),
|
||||||
|
"overrideScript": MessageLookupByLibrary.simpleMessage("Override script"),
|
||||||
"palette": MessageLookupByLibrary.simpleMessage("Palette"),
|
"palette": MessageLookupByLibrary.simpleMessage("Palette"),
|
||||||
"password": MessageLookupByLibrary.simpleMessage("Password"),
|
"password": MessageLookupByLibrary.simpleMessage("Password"),
|
||||||
"paste": MessageLookupByLibrary.simpleMessage("Paste"),
|
"paste": MessageLookupByLibrary.simpleMessage("Paste"),
|
||||||
@@ -529,7 +586,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"portConflictTip": MessageLookupByLibrary.simpleMessage(
|
"portConflictTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"Please enter a different port",
|
"Please enter a different port",
|
||||||
),
|
),
|
||||||
"portTip": m7,
|
"portTip": m11,
|
||||||
"preferH3Desc": MessageLookupByLibrary.simpleMessage(
|
"preferH3Desc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Prioritize the use of DOH\'s http/3",
|
"Prioritize the use of DOH\'s http/3",
|
||||||
),
|
),
|
||||||
@@ -603,6 +660,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"redirPort": MessageLookupByLibrary.simpleMessage("Redir Port"),
|
"redirPort": MessageLookupByLibrary.simpleMessage("Redir Port"),
|
||||||
"redo": MessageLookupByLibrary.simpleMessage("redo"),
|
"redo": MessageLookupByLibrary.simpleMessage("redo"),
|
||||||
"regExp": MessageLookupByLibrary.simpleMessage("RegExp"),
|
"regExp": MessageLookupByLibrary.simpleMessage("RegExp"),
|
||||||
|
"reload": MessageLookupByLibrary.simpleMessage("Reload"),
|
||||||
"remote": MessageLookupByLibrary.simpleMessage("Remote"),
|
"remote": MessageLookupByLibrary.simpleMessage("Remote"),
|
||||||
"remoteBackupDesc": MessageLookupByLibrary.simpleMessage(
|
"remoteBackupDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Backup local data to WebDAV",
|
"Backup local data to WebDAV",
|
||||||
@@ -621,6 +679,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"View recently request records",
|
"View recently request records",
|
||||||
),
|
),
|
||||||
"reset": MessageLookupByLibrary.simpleMessage("Reset"),
|
"reset": MessageLookupByLibrary.simpleMessage("Reset"),
|
||||||
|
"resetPageChangesTip": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"The current page has changes. Are you sure you want to reset?",
|
||||||
|
),
|
||||||
"resetTip": MessageLookupByLibrary.simpleMessage("Make sure to reset"),
|
"resetTip": MessageLookupByLibrary.simpleMessage("Make sure to reset"),
|
||||||
"resources": MessageLookupByLibrary.simpleMessage("Resources"),
|
"resources": MessageLookupByLibrary.simpleMessage("Resources"),
|
||||||
"resourcesDesc": MessageLookupByLibrary.simpleMessage(
|
"resourcesDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
@@ -630,6 +691,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"respectRulesDesc": MessageLookupByLibrary.simpleMessage(
|
"respectRulesDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"DNS connection following rules, need to configure proxy-server-nameserver",
|
"DNS connection following rules, need to configure proxy-server-nameserver",
|
||||||
),
|
),
|
||||||
|
"restart": MessageLookupByLibrary.simpleMessage("Restart"),
|
||||||
"restartCoreTip": MessageLookupByLibrary.simpleMessage(
|
"restartCoreTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"Are you sure you want to restart the core?",
|
"Are you sure you want to restart the core?",
|
||||||
),
|
),
|
||||||
@@ -655,11 +717,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Are you sure you want to save?",
|
"Are you sure you want to save?",
|
||||||
),
|
),
|
||||||
"script": MessageLookupByLibrary.simpleMessage("Script"),
|
"script": MessageLookupByLibrary.simpleMessage("Script"),
|
||||||
|
"scriptModeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Script mode, use external extension scripts, provide one-click override configuration capability",
|
||||||
|
),
|
||||||
"search": MessageLookupByLibrary.simpleMessage("Search"),
|
"search": MessageLookupByLibrary.simpleMessage("Search"),
|
||||||
"seconds": MessageLookupByLibrary.simpleMessage("Seconds"),
|
"seconds": MessageLookupByLibrary.simpleMessage("Seconds"),
|
||||||
"selectAll": MessageLookupByLibrary.simpleMessage("Select all"),
|
"selectAll": MessageLookupByLibrary.simpleMessage("Select all"),
|
||||||
"selected": MessageLookupByLibrary.simpleMessage("Selected"),
|
"selected": MessageLookupByLibrary.simpleMessage("Selected"),
|
||||||
"selectedCountTitle": m8,
|
"selectedCountTitle": m12,
|
||||||
"settings": MessageLookupByLibrary.simpleMessage("Settings"),
|
"settings": MessageLookupByLibrary.simpleMessage("Settings"),
|
||||||
"show": MessageLookupByLibrary.simpleMessage("Show"),
|
"show": MessageLookupByLibrary.simpleMessage("Show"),
|
||||||
"shrink": MessageLookupByLibrary.simpleMessage("Shrink"),
|
"shrink": MessageLookupByLibrary.simpleMessage("Shrink"),
|
||||||
@@ -674,8 +739,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"sourceIp": MessageLookupByLibrary.simpleMessage("Source IP"),
|
"sourceIp": MessageLookupByLibrary.simpleMessage("Source IP"),
|
||||||
"specialProxy": MessageLookupByLibrary.simpleMessage("Special proxy"),
|
"specialProxy": MessageLookupByLibrary.simpleMessage("Special proxy"),
|
||||||
"specialRules": MessageLookupByLibrary.simpleMessage("special rules"),
|
"specialRules": MessageLookupByLibrary.simpleMessage("special rules"),
|
||||||
|
"speedStatistics": MessageLookupByLibrary.simpleMessage("Speed statistics"),
|
||||||
"stackMode": MessageLookupByLibrary.simpleMessage("Stack mode"),
|
"stackMode": MessageLookupByLibrary.simpleMessage("Stack mode"),
|
||||||
"standard": MessageLookupByLibrary.simpleMessage("Standard"),
|
"standard": MessageLookupByLibrary.simpleMessage("Standard"),
|
||||||
|
"standardModeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Standard mode, override basic configuration, provide simple rule addition capability",
|
||||||
|
),
|
||||||
"start": MessageLookupByLibrary.simpleMessage("Start"),
|
"start": MessageLookupByLibrary.simpleMessage("Start"),
|
||||||
"startVpn": MessageLookupByLibrary.simpleMessage("Starting VPN..."),
|
"startVpn": MessageLookupByLibrary.simpleMessage("Starting VPN..."),
|
||||||
"status": MessageLookupByLibrary.simpleMessage("Status"),
|
"status": MessageLookupByLibrary.simpleMessage("Status"),
|
||||||
@@ -725,6 +794,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"tunDesc": MessageLookupByLibrary.simpleMessage(
|
"tunDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"only effective in administrator mode",
|
"only effective in administrator mode",
|
||||||
),
|
),
|
||||||
|
"turnOff": MessageLookupByLibrary.simpleMessage("Turn Off"),
|
||||||
|
"turnOn": MessageLookupByLibrary.simpleMessage("Turn On"),
|
||||||
"twoColumns": MessageLookupByLibrary.simpleMessage("Two columns"),
|
"twoColumns": MessageLookupByLibrary.simpleMessage("Two columns"),
|
||||||
"unableToUpdateCurrentProfileDesc": MessageLookupByLibrary.simpleMessage(
|
"unableToUpdateCurrentProfileDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"unable to update current profile",
|
"unable to update current profile",
|
||||||
@@ -742,12 +813,15 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"urlDesc": MessageLookupByLibrary.simpleMessage(
|
"urlDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Obtain profile through URL",
|
"Obtain profile through URL",
|
||||||
),
|
),
|
||||||
"urlTip": m9,
|
"urlTip": m13,
|
||||||
"useHosts": MessageLookupByLibrary.simpleMessage("Use hosts"),
|
"useHosts": MessageLookupByLibrary.simpleMessage("Use hosts"),
|
||||||
"useSystemHosts": MessageLookupByLibrary.simpleMessage("Use system hosts"),
|
"useSystemHosts": MessageLookupByLibrary.simpleMessage("Use system hosts"),
|
||||||
"value": MessageLookupByLibrary.simpleMessage("Value"),
|
"value": MessageLookupByLibrary.simpleMessage("Value"),
|
||||||
"vibrantScheme": MessageLookupByLibrary.simpleMessage("Vibrant"),
|
"vibrantScheme": MessageLookupByLibrary.simpleMessage("Vibrant"),
|
||||||
"view": MessageLookupByLibrary.simpleMessage("View"),
|
"view": MessageLookupByLibrary.simpleMessage("View"),
|
||||||
|
"vpnConfigChangeDetected": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"VPN configuration change detected",
|
||||||
|
),
|
||||||
"vpnDesc": MessageLookupByLibrary.simpleMessage(
|
"vpnDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Modify VPN related settings",
|
"Modify VPN related settings",
|
||||||
),
|
),
|
||||||
@@ -765,6 +839,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
),
|
),
|
||||||
"whitelistMode": MessageLookupByLibrary.simpleMessage("Whitelist mode"),
|
"whitelistMode": MessageLookupByLibrary.simpleMessage("Whitelist mode"),
|
||||||
"years": MessageLookupByLibrary.simpleMessage("Years"),
|
"years": MessageLookupByLibrary.simpleMessage("Years"),
|
||||||
|
"yearsAgo": m14,
|
||||||
"zh_CN": MessageLookupByLibrary.simpleMessage("Simplified Chinese"),
|
"zh_CN": MessageLookupByLibrary.simpleMessage("Simplified Chinese"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,25 +20,35 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
|
|||||||
class MessageLookup extends MessageLookupByLibrary {
|
class MessageLookup extends MessageLookupByLibrary {
|
||||||
String get localeName => 'ja';
|
String get localeName => 'ja';
|
||||||
|
|
||||||
static String m0(label) => "選択された${label}を削除してもよろしいですか?";
|
static String m0(count) => "${count}日前";
|
||||||
|
|
||||||
static String m1(label) => "現在の${label}を削除してもよろしいですか?";
|
static String m1(label) => "選択された${label}を削除してもよろしいですか?";
|
||||||
|
|
||||||
static String m2(label) => "${label}詳細";
|
static String m2(label) => "現在の${label}を削除してもよろしいですか?";
|
||||||
|
|
||||||
static String m3(label) => "${label}は空欄にできません";
|
static String m3(label) => "${label}詳細";
|
||||||
|
|
||||||
static String m4(label) => "現在の${label}は既に存在しています";
|
static String m4(label) => "${label}は空欄にできません";
|
||||||
|
|
||||||
static String m5(label) => "現在${label}はありません";
|
static String m5(label) => "現在の${label}は既に存在しています";
|
||||||
|
|
||||||
static String m6(label) => "${label}は数字でなければなりません";
|
static String m6(count) => "${count}時間前";
|
||||||
|
|
||||||
static String m7(label) => "${label} は 1024 から 49151 の間でなければなりません";
|
static String m7(count) => "${count}分前";
|
||||||
|
|
||||||
static String m8(count) => "${count} 項目が選択されています";
|
static String m8(count) => "${count}ヶ月前";
|
||||||
|
|
||||||
static String m9(label) => "${label}はURLである必要があります";
|
static String m9(label) => "まだ${label}はありません";
|
||||||
|
|
||||||
|
static String m10(label) => "${label}は数字でなければなりません";
|
||||||
|
|
||||||
|
static String m11(label) => "${label} は 1024 から 49151 の間でなければなりません";
|
||||||
|
|
||||||
|
static String m12(count) => "${count} 項目が選択されています";
|
||||||
|
|
||||||
|
static String m13(label) => "${label}はURLである必要があります";
|
||||||
|
|
||||||
|
static String m14(count) => "${count}年前";
|
||||||
|
|
||||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
||||||
@@ -53,6 +63,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"accessControlNotAllowDesc": MessageLookupByLibrary.simpleMessage(
|
"accessControlNotAllowDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"選択したアプリをVPNから除外",
|
"選択したアプリをVPNから除外",
|
||||||
),
|
),
|
||||||
|
"accessControlSettings": MessageLookupByLibrary.simpleMessage("アクセス制御設定"),
|
||||||
"account": MessageLookupByLibrary.simpleMessage("アカウント"),
|
"account": MessageLookupByLibrary.simpleMessage("アカウント"),
|
||||||
"action": MessageLookupByLibrary.simpleMessage("アクション"),
|
"action": MessageLookupByLibrary.simpleMessage("アクション"),
|
||||||
"action_mode": MessageLookupByLibrary.simpleMessage("モード切替"),
|
"action_mode": MessageLookupByLibrary.simpleMessage("モード切替"),
|
||||||
@@ -63,11 +74,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"add": MessageLookupByLibrary.simpleMessage("追加"),
|
"add": MessageLookupByLibrary.simpleMessage("追加"),
|
||||||
"addRule": MessageLookupByLibrary.simpleMessage("ルールを追加"),
|
"addRule": MessageLookupByLibrary.simpleMessage("ルールを追加"),
|
||||||
"addedOriginRules": MessageLookupByLibrary.simpleMessage("元のルールに追加"),
|
"addedOriginRules": MessageLookupByLibrary.simpleMessage("元のルールに追加"),
|
||||||
|
"addedRules": MessageLookupByLibrary.simpleMessage("追加ルール"),
|
||||||
"address": MessageLookupByLibrary.simpleMessage("アドレス"),
|
"address": MessageLookupByLibrary.simpleMessage("アドレス"),
|
||||||
"addressHelp": MessageLookupByLibrary.simpleMessage("WebDAVサーバーアドレス"),
|
"addressHelp": MessageLookupByLibrary.simpleMessage("WebDAVサーバーアドレス"),
|
||||||
"addressTip": MessageLookupByLibrary.simpleMessage("有効なWebDAVアドレスを入力"),
|
"addressTip": MessageLookupByLibrary.simpleMessage("有効なWebDAVアドレスを入力"),
|
||||||
"adminAutoLaunch": MessageLookupByLibrary.simpleMessage("管理者自動起動"),
|
"adminAutoLaunch": MessageLookupByLibrary.simpleMessage("管理者自動起動"),
|
||||||
"adminAutoLaunchDesc": MessageLookupByLibrary.simpleMessage("管理者モードで起動"),
|
"adminAutoLaunchDesc": MessageLookupByLibrary.simpleMessage("管理者モードで起動"),
|
||||||
|
"advancedConfig": MessageLookupByLibrary.simpleMessage("高度な設定"),
|
||||||
|
"advancedConfigDesc": MessageLookupByLibrary.simpleMessage("多様な設定を提供"),
|
||||||
"ago": MessageLookupByLibrary.simpleMessage("前"),
|
"ago": MessageLookupByLibrary.simpleMessage("前"),
|
||||||
"agree": MessageLookupByLibrary.simpleMessage("同意"),
|
"agree": MessageLookupByLibrary.simpleMessage("同意"),
|
||||||
"allApps": MessageLookupByLibrary.simpleMessage("全アプリ"),
|
"allApps": MessageLookupByLibrary.simpleMessage("全アプリ"),
|
||||||
@@ -137,6 +151,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"有効化すると一部機能を失いますが、Clashの完全サポートを獲得",
|
"有効化すると一部機能を失いますが、Clashの完全サポートを獲得",
|
||||||
),
|
),
|
||||||
"confirm": MessageLookupByLibrary.simpleMessage("確認"),
|
"confirm": MessageLookupByLibrary.simpleMessage("確認"),
|
||||||
|
"confirmClearAllData": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"すべてのデータをクリアしてもよろしいですか?",
|
||||||
|
),
|
||||||
|
"confirmForceCrashCore": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"コアを強制的にクラッシュさせてもよろしいですか?",
|
||||||
|
),
|
||||||
"connected": MessageLookupByLibrary.simpleMessage("接続済み"),
|
"connected": MessageLookupByLibrary.simpleMessage("接続済み"),
|
||||||
"connecting": MessageLookupByLibrary.simpleMessage("接続中..."),
|
"connecting": MessageLookupByLibrary.simpleMessage("接続中..."),
|
||||||
"connection": MessageLookupByLibrary.simpleMessage("接続"),
|
"connection": MessageLookupByLibrary.simpleMessage("接続"),
|
||||||
@@ -146,11 +166,17 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"contactMe": MessageLookupByLibrary.simpleMessage("連絡する"),
|
"contactMe": MessageLookupByLibrary.simpleMessage("連絡する"),
|
||||||
"content": MessageLookupByLibrary.simpleMessage("内容"),
|
"content": MessageLookupByLibrary.simpleMessage("内容"),
|
||||||
"contentScheme": MessageLookupByLibrary.simpleMessage("コンテンツテーマ"),
|
"contentScheme": MessageLookupByLibrary.simpleMessage("コンテンツテーマ"),
|
||||||
|
"controlGlobalAddedRules": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"グローバル追加ルールを制御",
|
||||||
|
),
|
||||||
"copy": MessageLookupByLibrary.simpleMessage("コピー"),
|
"copy": MessageLookupByLibrary.simpleMessage("コピー"),
|
||||||
"copyEnvVar": MessageLookupByLibrary.simpleMessage("環境変数をコピー"),
|
"copyEnvVar": MessageLookupByLibrary.simpleMessage("環境変数をコピー"),
|
||||||
"copyLink": MessageLookupByLibrary.simpleMessage("リンクをコピー"),
|
"copyLink": MessageLookupByLibrary.simpleMessage("リンクをコピー"),
|
||||||
"copySuccess": MessageLookupByLibrary.simpleMessage("コピー成功"),
|
"copySuccess": MessageLookupByLibrary.simpleMessage("コピー成功"),
|
||||||
"core": MessageLookupByLibrary.simpleMessage("コア"),
|
"core": MessageLookupByLibrary.simpleMessage("コア"),
|
||||||
|
"coreConfigChangeDetected": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"コア設定の変更が検出されました",
|
||||||
|
),
|
||||||
"coreInfo": MessageLookupByLibrary.simpleMessage("コア情報"),
|
"coreInfo": MessageLookupByLibrary.simpleMessage("コア情報"),
|
||||||
"coreStatus": MessageLookupByLibrary.simpleMessage("コアステータス"),
|
"coreStatus": MessageLookupByLibrary.simpleMessage("コアステータス"),
|
||||||
"country": MessageLookupByLibrary.simpleMessage("国"),
|
"country": MessageLookupByLibrary.simpleMessage("国"),
|
||||||
@@ -169,6 +195,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
),
|
),
|
||||||
"dataCollectionTip": MessageLookupByLibrary.simpleMessage("データ収集説明"),
|
"dataCollectionTip": MessageLookupByLibrary.simpleMessage("データ収集説明"),
|
||||||
"days": MessageLookupByLibrary.simpleMessage("日"),
|
"days": MessageLookupByLibrary.simpleMessage("日"),
|
||||||
|
"daysAgo": m0,
|
||||||
"defaultNameserver": MessageLookupByLibrary.simpleMessage("デフォルトネームサーバー"),
|
"defaultNameserver": MessageLookupByLibrary.simpleMessage("デフォルトネームサーバー"),
|
||||||
"defaultNameserverDesc": MessageLookupByLibrary.simpleMessage(
|
"defaultNameserverDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"DNSサーバーの解決用",
|
"DNSサーバーの解決用",
|
||||||
@@ -178,15 +205,15 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"delay": MessageLookupByLibrary.simpleMessage("遅延"),
|
"delay": MessageLookupByLibrary.simpleMessage("遅延"),
|
||||||
"delaySort": MessageLookupByLibrary.simpleMessage("遅延順"),
|
"delaySort": MessageLookupByLibrary.simpleMessage("遅延順"),
|
||||||
"delete": MessageLookupByLibrary.simpleMessage("削除"),
|
"delete": MessageLookupByLibrary.simpleMessage("削除"),
|
||||||
"deleteMultipTip": m0,
|
"deleteMultipTip": m1,
|
||||||
"deleteTip": m1,
|
"deleteTip": m2,
|
||||||
"desc": MessageLookupByLibrary.simpleMessage(
|
"desc": MessageLookupByLibrary.simpleMessage(
|
||||||
"ClashMetaベースのマルチプラットフォームプロキシクライアント。シンプルで使いやすく、オープンソースで広告なし。",
|
"ClashMetaベースのマルチプラットフォームプロキシクライアント。シンプルで使いやすく、オープンソースで広告なし。",
|
||||||
),
|
),
|
||||||
"destination": MessageLookupByLibrary.simpleMessage("宛先"),
|
"destination": MessageLookupByLibrary.simpleMessage("宛先"),
|
||||||
"destinationGeoIP": MessageLookupByLibrary.simpleMessage("宛先地理情報"),
|
"destinationGeoIP": MessageLookupByLibrary.simpleMessage("宛先地理情報"),
|
||||||
"destinationIPASN": MessageLookupByLibrary.simpleMessage("宛先IP ASN"),
|
"destinationIPASN": MessageLookupByLibrary.simpleMessage("宛先IP ASN"),
|
||||||
"details": m2,
|
"details": m3,
|
||||||
"detectionTip": MessageLookupByLibrary.simpleMessage("サードパーティAPIに依存(参考値)"),
|
"detectionTip": MessageLookupByLibrary.simpleMessage("サードパーティAPIに依存(参考値)"),
|
||||||
"developerMode": MessageLookupByLibrary.simpleMessage("デベロッパーモード"),
|
"developerMode": MessageLookupByLibrary.simpleMessage("デベロッパーモード"),
|
||||||
"developerModeEnableTip": MessageLookupByLibrary.simpleMessage(
|
"developerModeEnableTip": MessageLookupByLibrary.simpleMessage(
|
||||||
@@ -207,7 +234,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"domain": MessageLookupByLibrary.simpleMessage("ドメイン"),
|
"domain": MessageLookupByLibrary.simpleMessage("ドメイン"),
|
||||||
"download": MessageLookupByLibrary.simpleMessage("ダウンロード"),
|
"download": MessageLookupByLibrary.simpleMessage("ダウンロード"),
|
||||||
"edit": MessageLookupByLibrary.simpleMessage("編集"),
|
"edit": MessageLookupByLibrary.simpleMessage("編集"),
|
||||||
"emptyTip": m3,
|
"editGlobalRules": MessageLookupByLibrary.simpleMessage("グローバルルールを編集"),
|
||||||
|
"editRule": MessageLookupByLibrary.simpleMessage("ルールを編集"),
|
||||||
|
"emptyTip": m4,
|
||||||
"en": MessageLookupByLibrary.simpleMessage("英語"),
|
"en": MessageLookupByLibrary.simpleMessage("英語"),
|
||||||
"enableOverride": MessageLookupByLibrary.simpleMessage("上書きを有効化"),
|
"enableOverride": MessageLookupByLibrary.simpleMessage("上書きを有効化"),
|
||||||
"entries": MessageLookupByLibrary.simpleMessage(" エントリ"),
|
"entries": MessageLookupByLibrary.simpleMessage(" エントリ"),
|
||||||
@@ -215,7 +244,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"excludeDesc": MessageLookupByLibrary.simpleMessage(
|
"excludeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"アプリがバックグラウンド時に最近のタスクから非表示",
|
"アプリがバックグラウンド時に最近のタスクから非表示",
|
||||||
),
|
),
|
||||||
"existsTip": m4,
|
"existsTip": m5,
|
||||||
"exit": MessageLookupByLibrary.simpleMessage("終了"),
|
"exit": MessageLookupByLibrary.simpleMessage("終了"),
|
||||||
"expand": MessageLookupByLibrary.simpleMessage("標準"),
|
"expand": MessageLookupByLibrary.simpleMessage("標準"),
|
||||||
"expirationTime": MessageLookupByLibrary.simpleMessage("有効期限"),
|
"expirationTime": MessageLookupByLibrary.simpleMessage("有効期限"),
|
||||||
@@ -227,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"externalControllerDesc": MessageLookupByLibrary.simpleMessage(
|
"externalControllerDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"有効化するとClashコアをポート9090で制御可能",
|
"有効化するとClashコアをポート9090で制御可能",
|
||||||
),
|
),
|
||||||
|
"externalFetch": MessageLookupByLibrary.simpleMessage("外部取得"),
|
||||||
"externalLink": MessageLookupByLibrary.simpleMessage("外部リンク"),
|
"externalLink": MessageLookupByLibrary.simpleMessage("外部リンク"),
|
||||||
"externalResources": MessageLookupByLibrary.simpleMessage("外部リソース"),
|
"externalResources": MessageLookupByLibrary.simpleMessage("外部リソース"),
|
||||||
"fakeipFilter": MessageLookupByLibrary.simpleMessage("Fakeipフィルター"),
|
"fakeipFilter": MessageLookupByLibrary.simpleMessage("Fakeipフィルター"),
|
||||||
@@ -263,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"global": MessageLookupByLibrary.simpleMessage("グローバル"),
|
"global": MessageLookupByLibrary.simpleMessage("グローバル"),
|
||||||
"go": MessageLookupByLibrary.simpleMessage("移動"),
|
"go": MessageLookupByLibrary.simpleMessage("移動"),
|
||||||
"goDownload": MessageLookupByLibrary.simpleMessage("ダウンロードへ"),
|
"goDownload": MessageLookupByLibrary.simpleMessage("ダウンロードへ"),
|
||||||
|
"goToConfigureScript": MessageLookupByLibrary.simpleMessage("スクリプト設定に移動"),
|
||||||
"hasCacheChange": MessageLookupByLibrary.simpleMessage("変更をキャッシュしますか?"),
|
"hasCacheChange": MessageLookupByLibrary.simpleMessage("変更をキャッシュしますか?"),
|
||||||
"host": MessageLookupByLibrary.simpleMessage("ホスト"),
|
"host": MessageLookupByLibrary.simpleMessage("ホスト"),
|
||||||
"hostsDesc": MessageLookupByLibrary.simpleMessage("ホストを追加"),
|
"hostsDesc": MessageLookupByLibrary.simpleMessage("ホストを追加"),
|
||||||
@@ -272,6 +303,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"キーボードでアプリを制御",
|
"キーボードでアプリを制御",
|
||||||
),
|
),
|
||||||
"hours": MessageLookupByLibrary.simpleMessage("時間"),
|
"hours": MessageLookupByLibrary.simpleMessage("時間"),
|
||||||
|
"hoursAgo": m6,
|
||||||
"icon": MessageLookupByLibrary.simpleMessage("アイコン"),
|
"icon": MessageLookupByLibrary.simpleMessage("アイコン"),
|
||||||
"iconConfiguration": MessageLookupByLibrary.simpleMessage("アイコン設定"),
|
"iconConfiguration": MessageLookupByLibrary.simpleMessage("アイコン設定"),
|
||||||
"iconStyle": MessageLookupByLibrary.simpleMessage("アイコンスタイル"),
|
"iconStyle": MessageLookupByLibrary.simpleMessage("アイコンスタイル"),
|
||||||
@@ -291,6 +323,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"ipv6InboundDesc": MessageLookupByLibrary.simpleMessage("IPv6インバウンドを許可"),
|
"ipv6InboundDesc": MessageLookupByLibrary.simpleMessage("IPv6インバウンドを許可"),
|
||||||
"ja": MessageLookupByLibrary.simpleMessage("日本語"),
|
"ja": MessageLookupByLibrary.simpleMessage("日本語"),
|
||||||
"just": MessageLookupByLibrary.simpleMessage("たった今"),
|
"just": MessageLookupByLibrary.simpleMessage("たった今"),
|
||||||
|
"justNow": MessageLookupByLibrary.simpleMessage("たった今"),
|
||||||
"keepAliveIntervalDesc": MessageLookupByLibrary.simpleMessage(
|
"keepAliveIntervalDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"TCPキープアライブ間隔",
|
"TCPキープアライブ間隔",
|
||||||
),
|
),
|
||||||
@@ -300,6 +333,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"light": MessageLookupByLibrary.simpleMessage("ライト"),
|
"light": MessageLookupByLibrary.simpleMessage("ライト"),
|
||||||
"list": MessageLookupByLibrary.simpleMessage("リスト"),
|
"list": MessageLookupByLibrary.simpleMessage("リスト"),
|
||||||
"listen": MessageLookupByLibrary.simpleMessage("リスン"),
|
"listen": MessageLookupByLibrary.simpleMessage("リスン"),
|
||||||
|
"loadTest": MessageLookupByLibrary.simpleMessage("読み込みテスト"),
|
||||||
|
"loading": MessageLookupByLibrary.simpleMessage("読み込み中..."),
|
||||||
"local": MessageLookupByLibrary.simpleMessage("ローカル"),
|
"local": MessageLookupByLibrary.simpleMessage("ローカル"),
|
||||||
"localBackupDesc": MessageLookupByLibrary.simpleMessage("ローカルにデータをバックアップ"),
|
"localBackupDesc": MessageLookupByLibrary.simpleMessage("ローカルにデータをバックアップ"),
|
||||||
"localRecoveryDesc": MessageLookupByLibrary.simpleMessage("ファイルからデータを復元"),
|
"localRecoveryDesc": MessageLookupByLibrary.simpleMessage("ファイルからデータを復元"),
|
||||||
@@ -322,10 +357,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"システムの終了イベントを変更",
|
"システムの終了イベントを変更",
|
||||||
),
|
),
|
||||||
"minutes": MessageLookupByLibrary.simpleMessage("分"),
|
"minutes": MessageLookupByLibrary.simpleMessage("分"),
|
||||||
|
"minutesAgo": m7,
|
||||||
"mixedPort": MessageLookupByLibrary.simpleMessage("混合ポート"),
|
"mixedPort": MessageLookupByLibrary.simpleMessage("混合ポート"),
|
||||||
"mode": MessageLookupByLibrary.simpleMessage("モード"),
|
"mode": MessageLookupByLibrary.simpleMessage("モード"),
|
||||||
"monochromeScheme": MessageLookupByLibrary.simpleMessage("モノクローム"),
|
"monochromeScheme": MessageLookupByLibrary.simpleMessage("モノクローム"),
|
||||||
"months": MessageLookupByLibrary.simpleMessage("月"),
|
"months": MessageLookupByLibrary.simpleMessage("月"),
|
||||||
|
"monthsAgo": m8,
|
||||||
"more": MessageLookupByLibrary.simpleMessage("詳細"),
|
"more": MessageLookupByLibrary.simpleMessage("詳細"),
|
||||||
"name": MessageLookupByLibrary.simpleMessage("名前"),
|
"name": MessageLookupByLibrary.simpleMessage("名前"),
|
||||||
"nameSort": MessageLookupByLibrary.simpleMessage("名前順"),
|
"nameSort": MessageLookupByLibrary.simpleMessage("名前順"),
|
||||||
@@ -345,6 +382,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"noHotKey": MessageLookupByLibrary.simpleMessage("ホットキーなし"),
|
"noHotKey": MessageLookupByLibrary.simpleMessage("ホットキーなし"),
|
||||||
"noIcon": MessageLookupByLibrary.simpleMessage("なし"),
|
"noIcon": MessageLookupByLibrary.simpleMessage("なし"),
|
||||||
"noInfo": MessageLookupByLibrary.simpleMessage("情報なし"),
|
"noInfo": MessageLookupByLibrary.simpleMessage("情報なし"),
|
||||||
|
"noLongerRemind": MessageLookupByLibrary.simpleMessage("今後表示しない"),
|
||||||
"noMoreInfoDesc": MessageLookupByLibrary.simpleMessage("追加情報なし"),
|
"noMoreInfoDesc": MessageLookupByLibrary.simpleMessage("追加情報なし"),
|
||||||
"noNetwork": MessageLookupByLibrary.simpleMessage("ネットワークなし"),
|
"noNetwork": MessageLookupByLibrary.simpleMessage("ネットワークなし"),
|
||||||
"noNetworkApp": MessageLookupByLibrary.simpleMessage("ネットワークなしアプリ"),
|
"noNetworkApp": MessageLookupByLibrary.simpleMessage("ネットワークなしアプリ"),
|
||||||
@@ -360,8 +398,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"nullProfileDesc": MessageLookupByLibrary.simpleMessage(
|
"nullProfileDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"プロファイルがありません。追加してください",
|
"プロファイルがありません。追加してください",
|
||||||
),
|
),
|
||||||
"nullTip": m5,
|
"nullTip": m9,
|
||||||
"numberTip": m6,
|
"numberTip": m10,
|
||||||
"oneColumn": MessageLookupByLibrary.simpleMessage("1列"),
|
"oneColumn": MessageLookupByLibrary.simpleMessage("1列"),
|
||||||
"onlyIcon": MessageLookupByLibrary.simpleMessage("アイコンのみ"),
|
"onlyIcon": MessageLookupByLibrary.simpleMessage("アイコンのみ"),
|
||||||
"onlyOtherApps": MessageLookupByLibrary.simpleMessage("サードパーティアプリのみ"),
|
"onlyOtherApps": MessageLookupByLibrary.simpleMessage("サードパーティアプリのみ"),
|
||||||
@@ -382,7 +420,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"overrideInvalidTip": MessageLookupByLibrary.simpleMessage(
|
"overrideInvalidTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"スクリプトモードでは有効になりません",
|
"スクリプトモードでは有効になりません",
|
||||||
),
|
),
|
||||||
|
"overrideMode": MessageLookupByLibrary.simpleMessage("上書きモード"),
|
||||||
"overrideOriginRules": MessageLookupByLibrary.simpleMessage("元のルールを上書き"),
|
"overrideOriginRules": MessageLookupByLibrary.simpleMessage("元のルールを上書き"),
|
||||||
|
"overrideScript": MessageLookupByLibrary.simpleMessage("上書きスクリプト"),
|
||||||
"palette": MessageLookupByLibrary.simpleMessage("パレット"),
|
"palette": MessageLookupByLibrary.simpleMessage("パレット"),
|
||||||
"password": MessageLookupByLibrary.simpleMessage("パスワード"),
|
"password": MessageLookupByLibrary.simpleMessage("パスワード"),
|
||||||
"paste": MessageLookupByLibrary.simpleMessage("貼り付け"),
|
"paste": MessageLookupByLibrary.simpleMessage("貼り付け"),
|
||||||
@@ -403,7 +443,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
),
|
),
|
||||||
"port": MessageLookupByLibrary.simpleMessage("ポート"),
|
"port": MessageLookupByLibrary.simpleMessage("ポート"),
|
||||||
"portConflictTip": MessageLookupByLibrary.simpleMessage("別のポートを入力してください"),
|
"portConflictTip": MessageLookupByLibrary.simpleMessage("別のポートを入力してください"),
|
||||||
"portTip": m7,
|
"portTip": m11,
|
||||||
"preferH3Desc": MessageLookupByLibrary.simpleMessage("DOHのHTTP/3を優先使用"),
|
"preferH3Desc": MessageLookupByLibrary.simpleMessage("DOHのHTTP/3を優先使用"),
|
||||||
"pressKeyboard": MessageLookupByLibrary.simpleMessage("キーボードを押してください"),
|
"pressKeyboard": MessageLookupByLibrary.simpleMessage("キーボードを押してください"),
|
||||||
"preview": MessageLookupByLibrary.simpleMessage("プレビュー"),
|
"preview": MessageLookupByLibrary.simpleMessage("プレビュー"),
|
||||||
@@ -459,6 +499,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"redirPort": MessageLookupByLibrary.simpleMessage("Redirポート"),
|
"redirPort": MessageLookupByLibrary.simpleMessage("Redirポート"),
|
||||||
"redo": MessageLookupByLibrary.simpleMessage("やり直す"),
|
"redo": MessageLookupByLibrary.simpleMessage("やり直す"),
|
||||||
"regExp": MessageLookupByLibrary.simpleMessage("正規表現"),
|
"regExp": MessageLookupByLibrary.simpleMessage("正規表現"),
|
||||||
|
"reload": MessageLookupByLibrary.simpleMessage("リロード"),
|
||||||
"remote": MessageLookupByLibrary.simpleMessage("リモート"),
|
"remote": MessageLookupByLibrary.simpleMessage("リモート"),
|
||||||
"remoteBackupDesc": MessageLookupByLibrary.simpleMessage(
|
"remoteBackupDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"WebDAVにデータをバックアップ",
|
"WebDAVにデータをバックアップ",
|
||||||
@@ -473,6 +514,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"requests": MessageLookupByLibrary.simpleMessage("リクエスト"),
|
"requests": MessageLookupByLibrary.simpleMessage("リクエスト"),
|
||||||
"requestsDesc": MessageLookupByLibrary.simpleMessage("最近のリクエスト記録を表示"),
|
"requestsDesc": MessageLookupByLibrary.simpleMessage("最近のリクエスト記録を表示"),
|
||||||
"reset": MessageLookupByLibrary.simpleMessage("リセット"),
|
"reset": MessageLookupByLibrary.simpleMessage("リセット"),
|
||||||
|
"resetPageChangesTip": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"現在のページに変更があります。リセットしてもよろしいですか?",
|
||||||
|
),
|
||||||
"resetTip": MessageLookupByLibrary.simpleMessage("リセットを確定"),
|
"resetTip": MessageLookupByLibrary.simpleMessage("リセットを確定"),
|
||||||
"resources": MessageLookupByLibrary.simpleMessage("リソース"),
|
"resources": MessageLookupByLibrary.simpleMessage("リソース"),
|
||||||
"resourcesDesc": MessageLookupByLibrary.simpleMessage("外部リソース関連情報"),
|
"resourcesDesc": MessageLookupByLibrary.simpleMessage("外部リソース関連情報"),
|
||||||
@@ -480,6 +524,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"respectRulesDesc": MessageLookupByLibrary.simpleMessage(
|
"respectRulesDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"DNS接続がルールに従う(proxy-server-nameserverの設定が必要)",
|
"DNS接続がルールに従う(proxy-server-nameserverの設定が必要)",
|
||||||
),
|
),
|
||||||
|
"restart": MessageLookupByLibrary.simpleMessage("再起動"),
|
||||||
"restartCoreTip": MessageLookupByLibrary.simpleMessage("コアを再起動してもよろしいですか?"),
|
"restartCoreTip": MessageLookupByLibrary.simpleMessage("コアを再起動してもよろしいですか?"),
|
||||||
"routeAddress": MessageLookupByLibrary.simpleMessage("ルートアドレス"),
|
"routeAddress": MessageLookupByLibrary.simpleMessage("ルートアドレス"),
|
||||||
"routeAddressDesc": MessageLookupByLibrary.simpleMessage("ルートアドレスを設定"),
|
"routeAddressDesc": MessageLookupByLibrary.simpleMessage("ルートアドレスを設定"),
|
||||||
@@ -497,11 +542,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"saveChanges": MessageLookupByLibrary.simpleMessage("変更を保存しますか?"),
|
"saveChanges": MessageLookupByLibrary.simpleMessage("変更を保存しますか?"),
|
||||||
"saveTip": MessageLookupByLibrary.simpleMessage("保存してもよろしいですか?"),
|
"saveTip": MessageLookupByLibrary.simpleMessage("保存してもよろしいですか?"),
|
||||||
"script": MessageLookupByLibrary.simpleMessage("スクリプト"),
|
"script": MessageLookupByLibrary.simpleMessage("スクリプト"),
|
||||||
|
"scriptModeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"スクリプトモード、外部拡張スクリプトを使用し、ワンクリックで設定を上書きする機能を提供",
|
||||||
|
),
|
||||||
"search": MessageLookupByLibrary.simpleMessage("検索"),
|
"search": MessageLookupByLibrary.simpleMessage("検索"),
|
||||||
"seconds": MessageLookupByLibrary.simpleMessage("秒"),
|
"seconds": MessageLookupByLibrary.simpleMessage("秒"),
|
||||||
"selectAll": MessageLookupByLibrary.simpleMessage("すべて選択"),
|
"selectAll": MessageLookupByLibrary.simpleMessage("すべて選択"),
|
||||||
"selected": MessageLookupByLibrary.simpleMessage("選択済み"),
|
"selected": MessageLookupByLibrary.simpleMessage("選択済み"),
|
||||||
"selectedCountTitle": m8,
|
"selectedCountTitle": m12,
|
||||||
"settings": MessageLookupByLibrary.simpleMessage("設定"),
|
"settings": MessageLookupByLibrary.simpleMessage("設定"),
|
||||||
"show": MessageLookupByLibrary.simpleMessage("表示"),
|
"show": MessageLookupByLibrary.simpleMessage("表示"),
|
||||||
"shrink": MessageLookupByLibrary.simpleMessage("縮小"),
|
"shrink": MessageLookupByLibrary.simpleMessage("縮小"),
|
||||||
@@ -514,8 +562,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"sourceIp": MessageLookupByLibrary.simpleMessage("送信元IP"),
|
"sourceIp": MessageLookupByLibrary.simpleMessage("送信元IP"),
|
||||||
"specialProxy": MessageLookupByLibrary.simpleMessage("特殊プロキシ"),
|
"specialProxy": MessageLookupByLibrary.simpleMessage("特殊プロキシ"),
|
||||||
"specialRules": MessageLookupByLibrary.simpleMessage("特殊ルール"),
|
"specialRules": MessageLookupByLibrary.simpleMessage("特殊ルール"),
|
||||||
|
"speedStatistics": MessageLookupByLibrary.simpleMessage("速度統計"),
|
||||||
"stackMode": MessageLookupByLibrary.simpleMessage("スタックモード"),
|
"stackMode": MessageLookupByLibrary.simpleMessage("スタックモード"),
|
||||||
"standard": MessageLookupByLibrary.simpleMessage("標準"),
|
"standard": MessageLookupByLibrary.simpleMessage("標準"),
|
||||||
|
"standardModeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"標準モード、基本設定を上書きし、シンプルなルール追加機能を提供",
|
||||||
|
),
|
||||||
"start": MessageLookupByLibrary.simpleMessage("開始"),
|
"start": MessageLookupByLibrary.simpleMessage("開始"),
|
||||||
"startVpn": MessageLookupByLibrary.simpleMessage("VPNを開始中..."),
|
"startVpn": MessageLookupByLibrary.simpleMessage("VPNを開始中..."),
|
||||||
"status": MessageLookupByLibrary.simpleMessage("ステータス"),
|
"status": MessageLookupByLibrary.simpleMessage("ステータス"),
|
||||||
@@ -555,6 +607,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"trafficUsage": MessageLookupByLibrary.simpleMessage("トラフィック使用量"),
|
"trafficUsage": MessageLookupByLibrary.simpleMessage("トラフィック使用量"),
|
||||||
"tun": MessageLookupByLibrary.simpleMessage("TUN"),
|
"tun": MessageLookupByLibrary.simpleMessage("TUN"),
|
||||||
"tunDesc": MessageLookupByLibrary.simpleMessage("管理者モードでのみ有効"),
|
"tunDesc": MessageLookupByLibrary.simpleMessage("管理者モードでのみ有効"),
|
||||||
|
"turnOff": MessageLookupByLibrary.simpleMessage("オフ"),
|
||||||
|
"turnOn": MessageLookupByLibrary.simpleMessage("オン"),
|
||||||
"twoColumns": MessageLookupByLibrary.simpleMessage("2列"),
|
"twoColumns": MessageLookupByLibrary.simpleMessage("2列"),
|
||||||
"unableToUpdateCurrentProfileDesc": MessageLookupByLibrary.simpleMessage(
|
"unableToUpdateCurrentProfileDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"現在のプロファイルを更新できません",
|
"現在のプロファイルを更新できません",
|
||||||
@@ -570,12 +624,15 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"upload": MessageLookupByLibrary.simpleMessage("アップロード"),
|
"upload": MessageLookupByLibrary.simpleMessage("アップロード"),
|
||||||
"url": MessageLookupByLibrary.simpleMessage("URL"),
|
"url": MessageLookupByLibrary.simpleMessage("URL"),
|
||||||
"urlDesc": MessageLookupByLibrary.simpleMessage("URL経由でプロファイルを取得"),
|
"urlDesc": MessageLookupByLibrary.simpleMessage("URL経由でプロファイルを取得"),
|
||||||
"urlTip": m9,
|
"urlTip": m13,
|
||||||
"useHosts": MessageLookupByLibrary.simpleMessage("ホストを使用"),
|
"useHosts": MessageLookupByLibrary.simpleMessage("ホストを使用"),
|
||||||
"useSystemHosts": MessageLookupByLibrary.simpleMessage("システムホストを使用"),
|
"useSystemHosts": MessageLookupByLibrary.simpleMessage("システムホストを使用"),
|
||||||
"value": MessageLookupByLibrary.simpleMessage("値"),
|
"value": MessageLookupByLibrary.simpleMessage("値"),
|
||||||
"vibrantScheme": MessageLookupByLibrary.simpleMessage("ビブラント"),
|
"vibrantScheme": MessageLookupByLibrary.simpleMessage("ビブラント"),
|
||||||
"view": MessageLookupByLibrary.simpleMessage("表示"),
|
"view": MessageLookupByLibrary.simpleMessage("表示"),
|
||||||
|
"vpnConfigChangeDetected": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"VPN設定の変更が検出されました",
|
||||||
|
),
|
||||||
"vpnDesc": MessageLookupByLibrary.simpleMessage("VPN関連設定の変更"),
|
"vpnDesc": MessageLookupByLibrary.simpleMessage("VPN関連設定の変更"),
|
||||||
"vpnEnableDesc": MessageLookupByLibrary.simpleMessage(
|
"vpnEnableDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"VpnService経由で全システムトラフィックをルーティング",
|
"VpnService経由で全システムトラフィックをルーティング",
|
||||||
@@ -587,6 +644,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"webDAVConfiguration": MessageLookupByLibrary.simpleMessage("WebDAV設定"),
|
"webDAVConfiguration": MessageLookupByLibrary.simpleMessage("WebDAV設定"),
|
||||||
"whitelistMode": MessageLookupByLibrary.simpleMessage("ホワイトリストモード"),
|
"whitelistMode": MessageLookupByLibrary.simpleMessage("ホワイトリストモード"),
|
||||||
"years": MessageLookupByLibrary.simpleMessage("年"),
|
"years": MessageLookupByLibrary.simpleMessage("年"),
|
||||||
|
"yearsAgo": m14,
|
||||||
"zh_CN": MessageLookupByLibrary.simpleMessage("簡体字中国語"),
|
"zh_CN": MessageLookupByLibrary.simpleMessage("簡体字中国語"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,26 +20,41 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
|
|||||||
class MessageLookup extends MessageLookupByLibrary {
|
class MessageLookup extends MessageLookupByLibrary {
|
||||||
String get localeName => 'ru';
|
String get localeName => 'ru';
|
||||||
|
|
||||||
static String m0(label) =>
|
static String m0(count) =>
|
||||||
|
"${Intl.plural(count, one: '${count} день назад', few: '${count} дня назад', many: '${count} дней назад', other: '${count} дня назад')}";
|
||||||
|
|
||||||
|
static String m1(label) =>
|
||||||
"Вы уверены, что хотите удалить выбранные ${label}?";
|
"Вы уверены, что хотите удалить выбранные ${label}?";
|
||||||
|
|
||||||
static String m1(label) => "Вы уверены, что хотите удалить текущий ${label}?";
|
static String m2(label) => "Вы уверены, что хотите удалить текущий ${label}?";
|
||||||
|
|
||||||
static String m2(label) => "Детали {}";
|
static String m3(label) => "Детали {}";
|
||||||
|
|
||||||
static String m3(label) => "${label} не может быть пустым";
|
static String m4(label) => "${label} не может быть пустым";
|
||||||
|
|
||||||
static String m4(label) => "Текущий ${label} уже существует";
|
static String m5(label) => "Текущий ${label} уже существует";
|
||||||
|
|
||||||
static String m5(label) => "Сейчас ${label} нет";
|
static String m6(count) =>
|
||||||
|
"${Intl.plural(count, one: '${count} час назад', few: '${count} часа назад', many: '${count} часов назад', other: '${count} часа назад')}";
|
||||||
|
|
||||||
static String m6(label) => "${label} должно быть числом";
|
static String m7(count) =>
|
||||||
|
"${Intl.plural(count, one: '${count} минута назад', few: '${count} минуты назад', many: '${count} минут назад', other: '${count} минуты назад')}";
|
||||||
|
|
||||||
static String m7(label) => "${label} должен быть числом от 1024 до 49151";
|
static String m8(count) =>
|
||||||
|
"${Intl.plural(count, one: '${count} месяц назад', few: '${count} месяца назад', many: '${count} месяцев назад', other: '${count} месяца назад')}";
|
||||||
|
|
||||||
static String m8(count) => "Выбрано ${count} элементов";
|
static String m9(label) => "${label} пока отсутствуют";
|
||||||
|
|
||||||
static String m9(label) => "${label} должен быть URL";
|
static String m10(label) => "${label} должно быть числом";
|
||||||
|
|
||||||
|
static String m11(label) => "${label} должен быть числом от 1024 до 49151";
|
||||||
|
|
||||||
|
static String m12(count) => "Выбрано ${count} элементов";
|
||||||
|
|
||||||
|
static String m13(label) => "${label} должен быть URL";
|
||||||
|
|
||||||
|
static String m14(count) =>
|
||||||
|
"${Intl.plural(count, one: '${count} год назад', few: '${count} года назад', many: '${count} лет назад', other: '${count} года назад')}";
|
||||||
|
|
||||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
||||||
@@ -54,6 +69,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"accessControlNotAllowDesc": MessageLookupByLibrary.simpleMessage(
|
"accessControlNotAllowDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Выбранные приложения будут исключены из VPN",
|
"Выбранные приложения будут исключены из VPN",
|
||||||
),
|
),
|
||||||
|
"accessControlSettings": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Настройки контроля доступа",
|
||||||
|
),
|
||||||
"account": MessageLookupByLibrary.simpleMessage("Аккаунт"),
|
"account": MessageLookupByLibrary.simpleMessage("Аккаунт"),
|
||||||
"action": MessageLookupByLibrary.simpleMessage("Действие"),
|
"action": MessageLookupByLibrary.simpleMessage("Действие"),
|
||||||
"action_mode": MessageLookupByLibrary.simpleMessage("Переключить режим"),
|
"action_mode": MessageLookupByLibrary.simpleMessage("Переключить режим"),
|
||||||
@@ -66,6 +84,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"addedOriginRules": MessageLookupByLibrary.simpleMessage(
|
"addedOriginRules": MessageLookupByLibrary.simpleMessage(
|
||||||
"Добавить к оригинальным правилам",
|
"Добавить к оригинальным правилам",
|
||||||
),
|
),
|
||||||
|
"addedRules": MessageLookupByLibrary.simpleMessage("Добавленные правила"),
|
||||||
"address": MessageLookupByLibrary.simpleMessage("Адрес"),
|
"address": MessageLookupByLibrary.simpleMessage("Адрес"),
|
||||||
"addressHelp": MessageLookupByLibrary.simpleMessage("Адрес сервера WebDAV"),
|
"addressHelp": MessageLookupByLibrary.simpleMessage("Адрес сервера WebDAV"),
|
||||||
"addressTip": MessageLookupByLibrary.simpleMessage(
|
"addressTip": MessageLookupByLibrary.simpleMessage(
|
||||||
@@ -77,6 +96,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"adminAutoLaunchDesc": MessageLookupByLibrary.simpleMessage(
|
"adminAutoLaunchDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Запуск с правами администратора при загрузке системы",
|
"Запуск с правами администратора при загрузке системы",
|
||||||
),
|
),
|
||||||
|
"advancedConfig": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Расширенная конфигурация",
|
||||||
|
),
|
||||||
|
"advancedConfigDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Предоставляет разнообразные варианты конфигурации",
|
||||||
|
),
|
||||||
"ago": MessageLookupByLibrary.simpleMessage(" назад"),
|
"ago": MessageLookupByLibrary.simpleMessage(" назад"),
|
||||||
"agree": MessageLookupByLibrary.simpleMessage("Согласен"),
|
"agree": MessageLookupByLibrary.simpleMessage("Согласен"),
|
||||||
"allApps": MessageLookupByLibrary.simpleMessage("Все приложения"),
|
"allApps": MessageLookupByLibrary.simpleMessage("Все приложения"),
|
||||||
@@ -188,6 +213,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Включение приведет к потере части функциональности приложения, но обеспечит полную поддержку Clash.",
|
"Включение приведет к потере части функциональности приложения, но обеспечит полную поддержку Clash.",
|
||||||
),
|
),
|
||||||
"confirm": MessageLookupByLibrary.simpleMessage("Подтвердить"),
|
"confirm": MessageLookupByLibrary.simpleMessage("Подтвердить"),
|
||||||
|
"confirmClearAllData": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Вы уверены, что хотите очистить все данные?",
|
||||||
|
),
|
||||||
|
"confirmForceCrashCore": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Вы уверены, что хотите принудительно аварийно завершить работу ядра?",
|
||||||
|
),
|
||||||
"connected": MessageLookupByLibrary.simpleMessage("Подключено"),
|
"connected": MessageLookupByLibrary.simpleMessage("Подключено"),
|
||||||
"connecting": MessageLookupByLibrary.simpleMessage("Подключение..."),
|
"connecting": MessageLookupByLibrary.simpleMessage("Подключение..."),
|
||||||
"connection": MessageLookupByLibrary.simpleMessage("Соединение"),
|
"connection": MessageLookupByLibrary.simpleMessage("Соединение"),
|
||||||
@@ -199,6 +230,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"contactMe": MessageLookupByLibrary.simpleMessage("Свяжитесь со мной"),
|
"contactMe": MessageLookupByLibrary.simpleMessage("Свяжитесь со мной"),
|
||||||
"content": MessageLookupByLibrary.simpleMessage("Содержание"),
|
"content": MessageLookupByLibrary.simpleMessage("Содержание"),
|
||||||
"contentScheme": MessageLookupByLibrary.simpleMessage("Контентная тема"),
|
"contentScheme": MessageLookupByLibrary.simpleMessage("Контентная тема"),
|
||||||
|
"controlGlobalAddedRules": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Управление глобальными добавленными правилами",
|
||||||
|
),
|
||||||
"copy": MessageLookupByLibrary.simpleMessage("Копировать"),
|
"copy": MessageLookupByLibrary.simpleMessage("Копировать"),
|
||||||
"copyEnvVar": MessageLookupByLibrary.simpleMessage(
|
"copyEnvVar": MessageLookupByLibrary.simpleMessage(
|
||||||
"Копирование переменных окружения",
|
"Копирование переменных окружения",
|
||||||
@@ -206,6 +240,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"copyLink": MessageLookupByLibrary.simpleMessage("Копировать ссылку"),
|
"copyLink": MessageLookupByLibrary.simpleMessage("Копировать ссылку"),
|
||||||
"copySuccess": MessageLookupByLibrary.simpleMessage("Копирование успешно"),
|
"copySuccess": MessageLookupByLibrary.simpleMessage("Копирование успешно"),
|
||||||
"core": MessageLookupByLibrary.simpleMessage("Ядро"),
|
"core": MessageLookupByLibrary.simpleMessage("Ядро"),
|
||||||
|
"coreConfigChangeDetected": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Обнаружено изменение конфигурации ядра",
|
||||||
|
),
|
||||||
"coreInfo": MessageLookupByLibrary.simpleMessage("Информация о ядре"),
|
"coreInfo": MessageLookupByLibrary.simpleMessage("Информация о ядре"),
|
||||||
"coreStatus": MessageLookupByLibrary.simpleMessage("Основной статус"),
|
"coreStatus": MessageLookupByLibrary.simpleMessage("Основной статус"),
|
||||||
"country": MessageLookupByLibrary.simpleMessage("Страна"),
|
"country": MessageLookupByLibrary.simpleMessage("Страна"),
|
||||||
@@ -226,6 +263,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Уведомление о сборе данных",
|
"Уведомление о сборе данных",
|
||||||
),
|
),
|
||||||
"days": MessageLookupByLibrary.simpleMessage("Дней"),
|
"days": MessageLookupByLibrary.simpleMessage("Дней"),
|
||||||
|
"daysAgo": m0,
|
||||||
"defaultNameserver": MessageLookupByLibrary.simpleMessage(
|
"defaultNameserver": MessageLookupByLibrary.simpleMessage(
|
||||||
"Сервер имен по умолчанию",
|
"Сервер имен по умолчанию",
|
||||||
),
|
),
|
||||||
@@ -239,8 +277,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"delay": MessageLookupByLibrary.simpleMessage("Задержка"),
|
"delay": MessageLookupByLibrary.simpleMessage("Задержка"),
|
||||||
"delaySort": MessageLookupByLibrary.simpleMessage("Сортировка по задержке"),
|
"delaySort": MessageLookupByLibrary.simpleMessage("Сортировка по задержке"),
|
||||||
"delete": MessageLookupByLibrary.simpleMessage("Удалить"),
|
"delete": MessageLookupByLibrary.simpleMessage("Удалить"),
|
||||||
"deleteMultipTip": m0,
|
"deleteMultipTip": m1,
|
||||||
"deleteTip": m1,
|
"deleteTip": m2,
|
||||||
"desc": MessageLookupByLibrary.simpleMessage(
|
"desc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Многоплатформенный прокси-клиент на основе ClashMeta, простой и удобный в использовании, с открытым исходным кодом и без рекламы.",
|
"Многоплатформенный прокси-клиент на основе ClashMeta, простой и удобный в использовании, с открытым исходным кодом и без рекламы.",
|
||||||
),
|
),
|
||||||
@@ -249,7 +287,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Геолокация назначения",
|
"Геолокация назначения",
|
||||||
),
|
),
|
||||||
"destinationIPASN": MessageLookupByLibrary.simpleMessage("ASN назначения"),
|
"destinationIPASN": MessageLookupByLibrary.simpleMessage("ASN назначения"),
|
||||||
"details": m2,
|
"details": m3,
|
||||||
"detectionTip": MessageLookupByLibrary.simpleMessage(
|
"detectionTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"Опирается на сторонний API, только для справки",
|
"Опирается на сторонний API, только для справки",
|
||||||
),
|
),
|
||||||
@@ -282,7 +320,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"domain": MessageLookupByLibrary.simpleMessage("Домен"),
|
"domain": MessageLookupByLibrary.simpleMessage("Домен"),
|
||||||
"download": MessageLookupByLibrary.simpleMessage("Скачивание"),
|
"download": MessageLookupByLibrary.simpleMessage("Скачивание"),
|
||||||
"edit": MessageLookupByLibrary.simpleMessage("Редактировать"),
|
"edit": MessageLookupByLibrary.simpleMessage("Редактировать"),
|
||||||
"emptyTip": m3,
|
"editGlobalRules": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Редактировать глобальные правила",
|
||||||
|
),
|
||||||
|
"editRule": MessageLookupByLibrary.simpleMessage("Редактировать правило"),
|
||||||
|
"emptyTip": m4,
|
||||||
"en": MessageLookupByLibrary.simpleMessage("Английский"),
|
"en": MessageLookupByLibrary.simpleMessage("Английский"),
|
||||||
"enableOverride": MessageLookupByLibrary.simpleMessage(
|
"enableOverride": MessageLookupByLibrary.simpleMessage(
|
||||||
"Включить переопределение",
|
"Включить переопределение",
|
||||||
@@ -294,7 +336,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"excludeDesc": MessageLookupByLibrary.simpleMessage(
|
"excludeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Когда приложение находится в фоновом режиме, оно скрыто из последних задач",
|
"Когда приложение находится в фоновом режиме, оно скрыто из последних задач",
|
||||||
),
|
),
|
||||||
"existsTip": m4,
|
"existsTip": m5,
|
||||||
"exit": MessageLookupByLibrary.simpleMessage("Выход"),
|
"exit": MessageLookupByLibrary.simpleMessage("Выход"),
|
||||||
"expand": MessageLookupByLibrary.simpleMessage("Стандартный"),
|
"expand": MessageLookupByLibrary.simpleMessage("Стандартный"),
|
||||||
"expirationTime": MessageLookupByLibrary.simpleMessage("Время истечения"),
|
"expirationTime": MessageLookupByLibrary.simpleMessage("Время истечения"),
|
||||||
@@ -308,6 +350,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"externalControllerDesc": MessageLookupByLibrary.simpleMessage(
|
"externalControllerDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"При включении ядро Clash можно контролировать на порту 9090",
|
"При включении ядро Clash можно контролировать на порту 9090",
|
||||||
),
|
),
|
||||||
|
"externalFetch": MessageLookupByLibrary.simpleMessage("Внешнее получение"),
|
||||||
"externalLink": MessageLookupByLibrary.simpleMessage("Внешняя ссылка"),
|
"externalLink": MessageLookupByLibrary.simpleMessage("Внешняя ссылка"),
|
||||||
"externalResources": MessageLookupByLibrary.simpleMessage(
|
"externalResources": MessageLookupByLibrary.simpleMessage(
|
||||||
"Внешние ресурсы",
|
"Внешние ресурсы",
|
||||||
@@ -360,6 +403,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"global": MessageLookupByLibrary.simpleMessage("Глобальный"),
|
"global": MessageLookupByLibrary.simpleMessage("Глобальный"),
|
||||||
"go": MessageLookupByLibrary.simpleMessage("Перейти"),
|
"go": MessageLookupByLibrary.simpleMessage("Перейти"),
|
||||||
"goDownload": MessageLookupByLibrary.simpleMessage("Перейти к загрузке"),
|
"goDownload": MessageLookupByLibrary.simpleMessage("Перейти к загрузке"),
|
||||||
|
"goToConfigureScript": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Перейти к настройке скрипта",
|
||||||
|
),
|
||||||
"hasCacheChange": MessageLookupByLibrary.simpleMessage(
|
"hasCacheChange": MessageLookupByLibrary.simpleMessage(
|
||||||
"Хотите сохранить изменения в кэше?",
|
"Хотите сохранить изменения в кэше?",
|
||||||
),
|
),
|
||||||
@@ -375,6 +421,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Использование клавиатуры для управления приложением",
|
"Использование клавиатуры для управления приложением",
|
||||||
),
|
),
|
||||||
"hours": MessageLookupByLibrary.simpleMessage("Часов"),
|
"hours": MessageLookupByLibrary.simpleMessage("Часов"),
|
||||||
|
"hoursAgo": m6,
|
||||||
"icon": MessageLookupByLibrary.simpleMessage("Иконка"),
|
"icon": MessageLookupByLibrary.simpleMessage("Иконка"),
|
||||||
"iconConfiguration": MessageLookupByLibrary.simpleMessage(
|
"iconConfiguration": MessageLookupByLibrary.simpleMessage(
|
||||||
"Конфигурация иконки",
|
"Конфигурация иконки",
|
||||||
@@ -406,6 +453,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
),
|
),
|
||||||
"ja": MessageLookupByLibrary.simpleMessage("Японский"),
|
"ja": MessageLookupByLibrary.simpleMessage("Японский"),
|
||||||
"just": MessageLookupByLibrary.simpleMessage("Только что"),
|
"just": MessageLookupByLibrary.simpleMessage("Только что"),
|
||||||
|
"justNow": MessageLookupByLibrary.simpleMessage("Только что"),
|
||||||
"keepAliveIntervalDesc": MessageLookupByLibrary.simpleMessage(
|
"keepAliveIntervalDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Интервал поддержания TCP-соединения",
|
"Интервал поддержания TCP-соединения",
|
||||||
),
|
),
|
||||||
@@ -415,6 +463,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"light": MessageLookupByLibrary.simpleMessage("Светлый"),
|
"light": MessageLookupByLibrary.simpleMessage("Светлый"),
|
||||||
"list": MessageLookupByLibrary.simpleMessage("Список"),
|
"list": MessageLookupByLibrary.simpleMessage("Список"),
|
||||||
"listen": MessageLookupByLibrary.simpleMessage("Слушать"),
|
"listen": MessageLookupByLibrary.simpleMessage("Слушать"),
|
||||||
|
"loadTest": MessageLookupByLibrary.simpleMessage("Тест загрузки"),
|
||||||
|
"loading": MessageLookupByLibrary.simpleMessage("Загрузка..."),
|
||||||
"local": MessageLookupByLibrary.simpleMessage("Локальный"),
|
"local": MessageLookupByLibrary.simpleMessage("Локальный"),
|
||||||
"localBackupDesc": MessageLookupByLibrary.simpleMessage(
|
"localBackupDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Резервное копирование локальных данных на локальный диск",
|
"Резервное копирование локальных данных на локальный диск",
|
||||||
@@ -451,10 +501,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Изменить стандартное событие выхода из системы",
|
"Изменить стандартное событие выхода из системы",
|
||||||
),
|
),
|
||||||
"minutes": MessageLookupByLibrary.simpleMessage("Минут"),
|
"minutes": MessageLookupByLibrary.simpleMessage("Минут"),
|
||||||
|
"minutesAgo": m7,
|
||||||
"mixedPort": MessageLookupByLibrary.simpleMessage("Смешанный порт"),
|
"mixedPort": MessageLookupByLibrary.simpleMessage("Смешанный порт"),
|
||||||
"mode": MessageLookupByLibrary.simpleMessage("Режим"),
|
"mode": MessageLookupByLibrary.simpleMessage("Режим"),
|
||||||
"monochromeScheme": MessageLookupByLibrary.simpleMessage("Монохром"),
|
"monochromeScheme": MessageLookupByLibrary.simpleMessage("Монохром"),
|
||||||
"months": MessageLookupByLibrary.simpleMessage("Месяцев"),
|
"months": MessageLookupByLibrary.simpleMessage("Месяцев"),
|
||||||
|
"monthsAgo": m8,
|
||||||
"more": MessageLookupByLibrary.simpleMessage("Еще"),
|
"more": MessageLookupByLibrary.simpleMessage("Еще"),
|
||||||
"name": MessageLookupByLibrary.simpleMessage("Имя"),
|
"name": MessageLookupByLibrary.simpleMessage("Имя"),
|
||||||
"nameSort": MessageLookupByLibrary.simpleMessage("Сортировка по имени"),
|
"nameSort": MessageLookupByLibrary.simpleMessage("Сортировка по имени"),
|
||||||
@@ -482,6 +534,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"noHotKey": MessageLookupByLibrary.simpleMessage("Нет горячей клавиши"),
|
"noHotKey": MessageLookupByLibrary.simpleMessage("Нет горячей клавиши"),
|
||||||
"noIcon": MessageLookupByLibrary.simpleMessage("Нет иконки"),
|
"noIcon": MessageLookupByLibrary.simpleMessage("Нет иконки"),
|
||||||
"noInfo": MessageLookupByLibrary.simpleMessage("Нет информации"),
|
"noInfo": MessageLookupByLibrary.simpleMessage("Нет информации"),
|
||||||
|
"noLongerRemind": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Больше не напоминать",
|
||||||
|
),
|
||||||
"noMoreInfoDesc": MessageLookupByLibrary.simpleMessage(
|
"noMoreInfoDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Нет дополнительной информации",
|
"Нет дополнительной информации",
|
||||||
),
|
),
|
||||||
@@ -499,8 +554,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"nullProfileDesc": MessageLookupByLibrary.simpleMessage(
|
"nullProfileDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Нет профиля, пожалуйста, добавьте профиль",
|
"Нет профиля, пожалуйста, добавьте профиль",
|
||||||
),
|
),
|
||||||
"nullTip": m5,
|
"nullTip": m9,
|
||||||
"numberTip": m6,
|
"numberTip": m10,
|
||||||
"oneColumn": MessageLookupByLibrary.simpleMessage("Один столбец"),
|
"oneColumn": MessageLookupByLibrary.simpleMessage("Один столбец"),
|
||||||
"onlyIcon": MessageLookupByLibrary.simpleMessage("Только иконка"),
|
"onlyIcon": MessageLookupByLibrary.simpleMessage("Только иконка"),
|
||||||
"onlyOtherApps": MessageLookupByLibrary.simpleMessage(
|
"onlyOtherApps": MessageLookupByLibrary.simpleMessage(
|
||||||
@@ -531,9 +586,15 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"overrideInvalidTip": MessageLookupByLibrary.simpleMessage(
|
"overrideInvalidTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"В скриптовом режиме не действует",
|
"В скриптовом режиме не действует",
|
||||||
),
|
),
|
||||||
|
"overrideMode": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Режим переопределения",
|
||||||
|
),
|
||||||
"overrideOriginRules": MessageLookupByLibrary.simpleMessage(
|
"overrideOriginRules": MessageLookupByLibrary.simpleMessage(
|
||||||
"Переопределить оригинальное правило",
|
"Переопределить оригинальное правило",
|
||||||
),
|
),
|
||||||
|
"overrideScript": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Скрипт переопределения",
|
||||||
|
),
|
||||||
"palette": MessageLookupByLibrary.simpleMessage("Палитра"),
|
"palette": MessageLookupByLibrary.simpleMessage("Палитра"),
|
||||||
"password": MessageLookupByLibrary.simpleMessage("Пароль"),
|
"password": MessageLookupByLibrary.simpleMessage("Пароль"),
|
||||||
"paste": MessageLookupByLibrary.simpleMessage("Вставить"),
|
"paste": MessageLookupByLibrary.simpleMessage("Вставить"),
|
||||||
@@ -556,7 +617,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"portConflictTip": MessageLookupByLibrary.simpleMessage(
|
"portConflictTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"Введите другой порт",
|
"Введите другой порт",
|
||||||
),
|
),
|
||||||
"portTip": m7,
|
"portTip": m11,
|
||||||
"preferH3Desc": MessageLookupByLibrary.simpleMessage(
|
"preferH3Desc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Приоритетное использование HTTP/3 для DOH",
|
"Приоритетное использование HTTP/3 для DOH",
|
||||||
),
|
),
|
||||||
@@ -636,6 +697,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"redirPort": MessageLookupByLibrary.simpleMessage("Redir-порт"),
|
"redirPort": MessageLookupByLibrary.simpleMessage("Redir-порт"),
|
||||||
"redo": MessageLookupByLibrary.simpleMessage("Повторить"),
|
"redo": MessageLookupByLibrary.simpleMessage("Повторить"),
|
||||||
"regExp": MessageLookupByLibrary.simpleMessage("Регулярное выражение"),
|
"regExp": MessageLookupByLibrary.simpleMessage("Регулярное выражение"),
|
||||||
|
"reload": MessageLookupByLibrary.simpleMessage("Перезагрузить"),
|
||||||
"remote": MessageLookupByLibrary.simpleMessage("Удаленный"),
|
"remote": MessageLookupByLibrary.simpleMessage("Удаленный"),
|
||||||
"remoteBackupDesc": MessageLookupByLibrary.simpleMessage(
|
"remoteBackupDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Резервное копирование локальных данных на WebDAV",
|
"Резервное копирование локальных данных на WebDAV",
|
||||||
@@ -654,6 +716,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Просмотр последних записей запросов",
|
"Просмотр последних записей запросов",
|
||||||
),
|
),
|
||||||
"reset": MessageLookupByLibrary.simpleMessage("Сброс"),
|
"reset": MessageLookupByLibrary.simpleMessage("Сброс"),
|
||||||
|
"resetPageChangesTip": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"На текущей странице есть изменения. Вы уверены, что хотите сбросить?",
|
||||||
|
),
|
||||||
"resetTip": MessageLookupByLibrary.simpleMessage(
|
"resetTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"Убедитесь, что хотите сбросить",
|
"Убедитесь, что хотите сбросить",
|
||||||
),
|
),
|
||||||
@@ -665,6 +730,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"respectRulesDesc": MessageLookupByLibrary.simpleMessage(
|
"respectRulesDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"DNS-соединение следует правилам, необходимо настроить proxy-server-nameserver",
|
"DNS-соединение следует правилам, необходимо настроить proxy-server-nameserver",
|
||||||
),
|
),
|
||||||
|
"restart": MessageLookupByLibrary.simpleMessage("Перезапустить"),
|
||||||
"restartCoreTip": MessageLookupByLibrary.simpleMessage(
|
"restartCoreTip": MessageLookupByLibrary.simpleMessage(
|
||||||
"Вы уверены, что хотите перезапустить ядро?",
|
"Вы уверены, что хотите перезапустить ядро?",
|
||||||
),
|
),
|
||||||
@@ -690,11 +756,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Вы уверены, что хотите сохранить?",
|
"Вы уверены, что хотите сохранить?",
|
||||||
),
|
),
|
||||||
"script": MessageLookupByLibrary.simpleMessage("Скрипт"),
|
"script": MessageLookupByLibrary.simpleMessage("Скрипт"),
|
||||||
|
"scriptModeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Режим скрипта, использование внешних расширяющих скриптов, предоставление возможности переопределения конфигурации одним кликом",
|
||||||
|
),
|
||||||
"search": MessageLookupByLibrary.simpleMessage("Поиск"),
|
"search": MessageLookupByLibrary.simpleMessage("Поиск"),
|
||||||
"seconds": MessageLookupByLibrary.simpleMessage("Секунд"),
|
"seconds": MessageLookupByLibrary.simpleMessage("Секунд"),
|
||||||
"selectAll": MessageLookupByLibrary.simpleMessage("Выбрать все"),
|
"selectAll": MessageLookupByLibrary.simpleMessage("Выбрать все"),
|
||||||
"selected": MessageLookupByLibrary.simpleMessage("Выбрано"),
|
"selected": MessageLookupByLibrary.simpleMessage("Выбрано"),
|
||||||
"selectedCountTitle": m8,
|
"selectedCountTitle": m12,
|
||||||
"settings": MessageLookupByLibrary.simpleMessage("Настройки"),
|
"settings": MessageLookupByLibrary.simpleMessage("Настройки"),
|
||||||
"show": MessageLookupByLibrary.simpleMessage("Показать"),
|
"show": MessageLookupByLibrary.simpleMessage("Показать"),
|
||||||
"shrink": MessageLookupByLibrary.simpleMessage("Сжать"),
|
"shrink": MessageLookupByLibrary.simpleMessage("Сжать"),
|
||||||
@@ -709,8 +778,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"sourceIp": MessageLookupByLibrary.simpleMessage("Исходный IP"),
|
"sourceIp": MessageLookupByLibrary.simpleMessage("Исходный IP"),
|
||||||
"specialProxy": MessageLookupByLibrary.simpleMessage("Специальный прокси"),
|
"specialProxy": MessageLookupByLibrary.simpleMessage("Специальный прокси"),
|
||||||
"specialRules": MessageLookupByLibrary.simpleMessage("Специальные правила"),
|
"specialRules": MessageLookupByLibrary.simpleMessage("Специальные правила"),
|
||||||
|
"speedStatistics": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Статистика скорости",
|
||||||
|
),
|
||||||
"stackMode": MessageLookupByLibrary.simpleMessage("Режим стека"),
|
"stackMode": MessageLookupByLibrary.simpleMessage("Режим стека"),
|
||||||
"standard": MessageLookupByLibrary.simpleMessage("Стандартный"),
|
"standard": MessageLookupByLibrary.simpleMessage("Стандартный"),
|
||||||
|
"standardModeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Стандартный режим, переопределение базовой конфигурации, предоставление возможности простого добавления правил",
|
||||||
|
),
|
||||||
"start": MessageLookupByLibrary.simpleMessage("Старт"),
|
"start": MessageLookupByLibrary.simpleMessage("Старт"),
|
||||||
"startVpn": MessageLookupByLibrary.simpleMessage("Запуск VPN..."),
|
"startVpn": MessageLookupByLibrary.simpleMessage("Запуск VPN..."),
|
||||||
"status": MessageLookupByLibrary.simpleMessage("Статус"),
|
"status": MessageLookupByLibrary.simpleMessage("Статус"),
|
||||||
@@ -762,6 +837,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"tunDesc": MessageLookupByLibrary.simpleMessage(
|
"tunDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"действительно только в режиме администратора",
|
"действительно только в режиме администратора",
|
||||||
),
|
),
|
||||||
|
"turnOff": MessageLookupByLibrary.simpleMessage("Выключить"),
|
||||||
|
"turnOn": MessageLookupByLibrary.simpleMessage("Включить"),
|
||||||
"twoColumns": MessageLookupByLibrary.simpleMessage("Два столбца"),
|
"twoColumns": MessageLookupByLibrary.simpleMessage("Два столбца"),
|
||||||
"unableToUpdateCurrentProfileDesc": MessageLookupByLibrary.simpleMessage(
|
"unableToUpdateCurrentProfileDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"невозможно обновить текущий профиль",
|
"невозможно обновить текущий профиль",
|
||||||
@@ -781,7 +858,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"urlDesc": MessageLookupByLibrary.simpleMessage(
|
"urlDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Получить профиль через URL",
|
"Получить профиль через URL",
|
||||||
),
|
),
|
||||||
"urlTip": m9,
|
"urlTip": m13,
|
||||||
"useHosts": MessageLookupByLibrary.simpleMessage("Использовать hosts"),
|
"useHosts": MessageLookupByLibrary.simpleMessage("Использовать hosts"),
|
||||||
"useSystemHosts": MessageLookupByLibrary.simpleMessage(
|
"useSystemHosts": MessageLookupByLibrary.simpleMessage(
|
||||||
"Использовать системные hosts",
|
"Использовать системные hosts",
|
||||||
@@ -789,6 +866,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"value": MessageLookupByLibrary.simpleMessage("Значение"),
|
"value": MessageLookupByLibrary.simpleMessage("Значение"),
|
||||||
"vibrantScheme": MessageLookupByLibrary.simpleMessage("Яркие"),
|
"vibrantScheme": MessageLookupByLibrary.simpleMessage("Яркие"),
|
||||||
"view": MessageLookupByLibrary.simpleMessage("Просмотр"),
|
"view": MessageLookupByLibrary.simpleMessage("Просмотр"),
|
||||||
|
"vpnConfigChangeDetected": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Обнаружено изменение конфигурации VPN",
|
||||||
|
),
|
||||||
"vpnDesc": MessageLookupByLibrary.simpleMessage(
|
"vpnDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"Изменение настроек, связанных с VPN",
|
"Изменение настроек, связанных с VPN",
|
||||||
),
|
),
|
||||||
@@ -808,6 +888,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"Режим белого списка",
|
"Режим белого списка",
|
||||||
),
|
),
|
||||||
"years": MessageLookupByLibrary.simpleMessage("Лет"),
|
"years": MessageLookupByLibrary.simpleMessage("Лет"),
|
||||||
|
"yearsAgo": m14,
|
||||||
"zh_CN": MessageLookupByLibrary.simpleMessage("Упрощенный китайский"),
|
"zh_CN": MessageLookupByLibrary.simpleMessage("Упрощенный китайский"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,25 +20,35 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
|
|||||||
class MessageLookup extends MessageLookupByLibrary {
|
class MessageLookup extends MessageLookupByLibrary {
|
||||||
String get localeName => 'zh_CN';
|
String get localeName => 'zh_CN';
|
||||||
|
|
||||||
static String m0(label) => "确定删除选中的${label}吗?";
|
static String m0(count) => "${count} 天前";
|
||||||
|
|
||||||
static String m1(label) => "确定删除当前${label}吗?";
|
static String m1(label) => "确定删除选中的${label}吗?";
|
||||||
|
|
||||||
static String m2(label) => "${label}详情";
|
static String m2(label) => "确定删除当前${label}吗?";
|
||||||
|
|
||||||
static String m3(label) => "${label}不能为空";
|
static String m3(label) => "${label}详情";
|
||||||
|
|
||||||
static String m4(label) => "${label}当前已存在";
|
static String m4(label) => "${label}不能为空";
|
||||||
|
|
||||||
static String m5(label) => "暂无${label}";
|
static String m5(label) => "${label}当前已存在";
|
||||||
|
|
||||||
static String m6(label) => "${label}必须为数字";
|
static String m6(count) => "${count} 小时前";
|
||||||
|
|
||||||
static String m7(label) => "${label} 必须在 1024 到 49151 之间";
|
static String m7(count) => "${count} 分钟前";
|
||||||
|
|
||||||
static String m8(count) => "已选择 ${count} 项";
|
static String m8(count) => "${count} 个月前";
|
||||||
|
|
||||||
static String m9(label) => "${label}必须为URL";
|
static String m9(label) => "暂无${label}";
|
||||||
|
|
||||||
|
static String m10(label) => "${label}必须为数字";
|
||||||
|
|
||||||
|
static String m11(label) => "${label} 必须在 1024 到 49151 之间";
|
||||||
|
|
||||||
|
static String m12(count) => "已选择 ${count} 项";
|
||||||
|
|
||||||
|
static String m13(label) => "${label}必须为URL";
|
||||||
|
|
||||||
|
static String m14(count) => "${count} 年前";
|
||||||
|
|
||||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
||||||
@@ -51,6 +61,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"accessControlNotAllowDesc": MessageLookupByLibrary.simpleMessage(
|
"accessControlNotAllowDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"选中应用将会被排除在VPN之外",
|
"选中应用将会被排除在VPN之外",
|
||||||
),
|
),
|
||||||
|
"accessControlSettings": MessageLookupByLibrary.simpleMessage("访问控制设置"),
|
||||||
"account": MessageLookupByLibrary.simpleMessage("账号"),
|
"account": MessageLookupByLibrary.simpleMessage("账号"),
|
||||||
"action": MessageLookupByLibrary.simpleMessage("操作"),
|
"action": MessageLookupByLibrary.simpleMessage("操作"),
|
||||||
"action_mode": MessageLookupByLibrary.simpleMessage("切换模式"),
|
"action_mode": MessageLookupByLibrary.simpleMessage("切换模式"),
|
||||||
@@ -61,11 +72,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"add": MessageLookupByLibrary.simpleMessage("添加"),
|
"add": MessageLookupByLibrary.simpleMessage("添加"),
|
||||||
"addRule": MessageLookupByLibrary.simpleMessage("添加规则"),
|
"addRule": MessageLookupByLibrary.simpleMessage("添加规则"),
|
||||||
"addedOriginRules": MessageLookupByLibrary.simpleMessage("附加到原始规则"),
|
"addedOriginRules": MessageLookupByLibrary.simpleMessage("附加到原始规则"),
|
||||||
|
"addedRules": MessageLookupByLibrary.simpleMessage("附加规则"),
|
||||||
"address": MessageLookupByLibrary.simpleMessage("地址"),
|
"address": MessageLookupByLibrary.simpleMessage("地址"),
|
||||||
"addressHelp": MessageLookupByLibrary.simpleMessage("WebDAV服务器地址"),
|
"addressHelp": MessageLookupByLibrary.simpleMessage("WebDAV服务器地址"),
|
||||||
"addressTip": MessageLookupByLibrary.simpleMessage("请输入有效的WebDAV地址"),
|
"addressTip": MessageLookupByLibrary.simpleMessage("请输入有效的WebDAV地址"),
|
||||||
"adminAutoLaunch": MessageLookupByLibrary.simpleMessage("管理员自启动"),
|
"adminAutoLaunch": MessageLookupByLibrary.simpleMessage("管理员自启动"),
|
||||||
"adminAutoLaunchDesc": MessageLookupByLibrary.simpleMessage("使用管理员模式开机自启动"),
|
"adminAutoLaunchDesc": MessageLookupByLibrary.simpleMessage("使用管理员模式开机自启动"),
|
||||||
|
"advancedConfig": MessageLookupByLibrary.simpleMessage("进阶配置"),
|
||||||
|
"advancedConfigDesc": MessageLookupByLibrary.simpleMessage("提供多样化配置"),
|
||||||
"ago": MessageLookupByLibrary.simpleMessage("前"),
|
"ago": MessageLookupByLibrary.simpleMessage("前"),
|
||||||
"agree": MessageLookupByLibrary.simpleMessage("同意"),
|
"agree": MessageLookupByLibrary.simpleMessage("同意"),
|
||||||
"allApps": MessageLookupByLibrary.simpleMessage("所有应用"),
|
"allApps": MessageLookupByLibrary.simpleMessage("所有应用"),
|
||||||
@@ -125,6 +139,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"开启将失去部分应用能力,获得全量的Clash的支持",
|
"开启将失去部分应用能力,获得全量的Clash的支持",
|
||||||
),
|
),
|
||||||
"confirm": MessageLookupByLibrary.simpleMessage("确定"),
|
"confirm": MessageLookupByLibrary.simpleMessage("确定"),
|
||||||
|
"confirmClearAllData": MessageLookupByLibrary.simpleMessage("确定要清除所有数据?"),
|
||||||
|
"confirmForceCrashCore": MessageLookupByLibrary.simpleMessage("确定要强制崩溃核心?"),
|
||||||
"connected": MessageLookupByLibrary.simpleMessage("已连接"),
|
"connected": MessageLookupByLibrary.simpleMessage("已连接"),
|
||||||
"connecting": MessageLookupByLibrary.simpleMessage("连接中..."),
|
"connecting": MessageLookupByLibrary.simpleMessage("连接中..."),
|
||||||
"connection": MessageLookupByLibrary.simpleMessage("连接"),
|
"connection": MessageLookupByLibrary.simpleMessage("连接"),
|
||||||
@@ -134,11 +150,15 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"contactMe": MessageLookupByLibrary.simpleMessage("联系我"),
|
"contactMe": MessageLookupByLibrary.simpleMessage("联系我"),
|
||||||
"content": MessageLookupByLibrary.simpleMessage("内容"),
|
"content": MessageLookupByLibrary.simpleMessage("内容"),
|
||||||
"contentScheme": MessageLookupByLibrary.simpleMessage("内容主题"),
|
"contentScheme": MessageLookupByLibrary.simpleMessage("内容主题"),
|
||||||
|
"controlGlobalAddedRules": MessageLookupByLibrary.simpleMessage("控制全局附加规则"),
|
||||||
"copy": MessageLookupByLibrary.simpleMessage("复制"),
|
"copy": MessageLookupByLibrary.simpleMessage("复制"),
|
||||||
"copyEnvVar": MessageLookupByLibrary.simpleMessage("复制环境变量"),
|
"copyEnvVar": MessageLookupByLibrary.simpleMessage("复制环境变量"),
|
||||||
"copyLink": MessageLookupByLibrary.simpleMessage("复制链接"),
|
"copyLink": MessageLookupByLibrary.simpleMessage("复制链接"),
|
||||||
"copySuccess": MessageLookupByLibrary.simpleMessage("复制成功"),
|
"copySuccess": MessageLookupByLibrary.simpleMessage("复制成功"),
|
||||||
"core": MessageLookupByLibrary.simpleMessage("内核"),
|
"core": MessageLookupByLibrary.simpleMessage("内核"),
|
||||||
|
"coreConfigChangeDetected": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"检测到核心配置更改",
|
||||||
|
),
|
||||||
"coreInfo": MessageLookupByLibrary.simpleMessage("内核信息"),
|
"coreInfo": MessageLookupByLibrary.simpleMessage("内核信息"),
|
||||||
"coreStatus": MessageLookupByLibrary.simpleMessage("核心状态"),
|
"coreStatus": MessageLookupByLibrary.simpleMessage("核心状态"),
|
||||||
"country": MessageLookupByLibrary.simpleMessage("区域"),
|
"country": MessageLookupByLibrary.simpleMessage("区域"),
|
||||||
@@ -157,6 +177,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
),
|
),
|
||||||
"dataCollectionTip": MessageLookupByLibrary.simpleMessage("数据收集说明"),
|
"dataCollectionTip": MessageLookupByLibrary.simpleMessage("数据收集说明"),
|
||||||
"days": MessageLookupByLibrary.simpleMessage("天"),
|
"days": MessageLookupByLibrary.simpleMessage("天"),
|
||||||
|
"daysAgo": m0,
|
||||||
"defaultNameserver": MessageLookupByLibrary.simpleMessage("默认域名服务器"),
|
"defaultNameserver": MessageLookupByLibrary.simpleMessage("默认域名服务器"),
|
||||||
"defaultNameserverDesc": MessageLookupByLibrary.simpleMessage("用于解析DNS服务器"),
|
"defaultNameserverDesc": MessageLookupByLibrary.simpleMessage("用于解析DNS服务器"),
|
||||||
"defaultSort": MessageLookupByLibrary.simpleMessage("按默认排序"),
|
"defaultSort": MessageLookupByLibrary.simpleMessage("按默认排序"),
|
||||||
@@ -164,15 +185,15 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"delay": MessageLookupByLibrary.simpleMessage("延迟"),
|
"delay": MessageLookupByLibrary.simpleMessage("延迟"),
|
||||||
"delaySort": MessageLookupByLibrary.simpleMessage("按延迟排序"),
|
"delaySort": MessageLookupByLibrary.simpleMessage("按延迟排序"),
|
||||||
"delete": MessageLookupByLibrary.simpleMessage("删除"),
|
"delete": MessageLookupByLibrary.simpleMessage("删除"),
|
||||||
"deleteMultipTip": m0,
|
"deleteMultipTip": m1,
|
||||||
"deleteTip": m1,
|
"deleteTip": m2,
|
||||||
"desc": MessageLookupByLibrary.simpleMessage(
|
"desc": MessageLookupByLibrary.simpleMessage(
|
||||||
"基于ClashMeta的多平台代理客户端,简单易用,开源无广告。",
|
"基于ClashMeta的多平台代理客户端,简单易用,开源无广告。",
|
||||||
),
|
),
|
||||||
"destination": MessageLookupByLibrary.simpleMessage("目标地址"),
|
"destination": MessageLookupByLibrary.simpleMessage("目标地址"),
|
||||||
"destinationGeoIP": MessageLookupByLibrary.simpleMessage("目标地理定位"),
|
"destinationGeoIP": MessageLookupByLibrary.simpleMessage("目标地理定位"),
|
||||||
"destinationIPASN": MessageLookupByLibrary.simpleMessage("目标IP ASN"),
|
"destinationIPASN": MessageLookupByLibrary.simpleMessage("目标IP ASN"),
|
||||||
"details": m2,
|
"details": m3,
|
||||||
"detectionTip": MessageLookupByLibrary.simpleMessage("依赖第三方api,仅供参考"),
|
"detectionTip": MessageLookupByLibrary.simpleMessage("依赖第三方api,仅供参考"),
|
||||||
"developerMode": MessageLookupByLibrary.simpleMessage("开发者模式"),
|
"developerMode": MessageLookupByLibrary.simpleMessage("开发者模式"),
|
||||||
"developerModeEnableTip": MessageLookupByLibrary.simpleMessage("开发者模式已启用。"),
|
"developerModeEnableTip": MessageLookupByLibrary.simpleMessage("开发者模式已启用。"),
|
||||||
@@ -191,13 +212,15 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"domain": MessageLookupByLibrary.simpleMessage("域名"),
|
"domain": MessageLookupByLibrary.simpleMessage("域名"),
|
||||||
"download": MessageLookupByLibrary.simpleMessage("下载"),
|
"download": MessageLookupByLibrary.simpleMessage("下载"),
|
||||||
"edit": MessageLookupByLibrary.simpleMessage("编辑"),
|
"edit": MessageLookupByLibrary.simpleMessage("编辑"),
|
||||||
"emptyTip": m3,
|
"editGlobalRules": MessageLookupByLibrary.simpleMessage("编辑全局规则"),
|
||||||
|
"editRule": MessageLookupByLibrary.simpleMessage("编辑规则"),
|
||||||
|
"emptyTip": m4,
|
||||||
"en": MessageLookupByLibrary.simpleMessage("英语"),
|
"en": MessageLookupByLibrary.simpleMessage("英语"),
|
||||||
"enableOverride": MessageLookupByLibrary.simpleMessage("启用覆写"),
|
"enableOverride": MessageLookupByLibrary.simpleMessage("启用覆写"),
|
||||||
"entries": MessageLookupByLibrary.simpleMessage("个条目"),
|
"entries": MessageLookupByLibrary.simpleMessage("个条目"),
|
||||||
"exclude": MessageLookupByLibrary.simpleMessage("从最近任务中隐藏"),
|
"exclude": MessageLookupByLibrary.simpleMessage("从最近任务中隐藏"),
|
||||||
"excludeDesc": MessageLookupByLibrary.simpleMessage("应用在后台时,从最近任务中隐藏应用"),
|
"excludeDesc": MessageLookupByLibrary.simpleMessage("应用在后台时,从最近任务中隐藏应用"),
|
||||||
"existsTip": m4,
|
"existsTip": m5,
|
||||||
"exit": MessageLookupByLibrary.simpleMessage("退出"),
|
"exit": MessageLookupByLibrary.simpleMessage("退出"),
|
||||||
"expand": MessageLookupByLibrary.simpleMessage("标准"),
|
"expand": MessageLookupByLibrary.simpleMessage("标准"),
|
||||||
"expirationTime": MessageLookupByLibrary.simpleMessage("到期时间"),
|
"expirationTime": MessageLookupByLibrary.simpleMessage("到期时间"),
|
||||||
@@ -209,6 +232,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"externalControllerDesc": MessageLookupByLibrary.simpleMessage(
|
"externalControllerDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"开启后将可以通过9090端口控制Clash内核",
|
"开启后将可以通过9090端口控制Clash内核",
|
||||||
),
|
),
|
||||||
|
"externalFetch": MessageLookupByLibrary.simpleMessage("外部获取"),
|
||||||
"externalLink": MessageLookupByLibrary.simpleMessage("外部链接"),
|
"externalLink": MessageLookupByLibrary.simpleMessage("外部链接"),
|
||||||
"externalResources": MessageLookupByLibrary.simpleMessage("外部资源"),
|
"externalResources": MessageLookupByLibrary.simpleMessage("外部资源"),
|
||||||
"fakeipFilter": MessageLookupByLibrary.simpleMessage("Fakeip过滤"),
|
"fakeipFilter": MessageLookupByLibrary.simpleMessage("Fakeip过滤"),
|
||||||
@@ -237,6 +261,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"global": MessageLookupByLibrary.simpleMessage("全局"),
|
"global": MessageLookupByLibrary.simpleMessage("全局"),
|
||||||
"go": MessageLookupByLibrary.simpleMessage("前往"),
|
"go": MessageLookupByLibrary.simpleMessage("前往"),
|
||||||
"goDownload": MessageLookupByLibrary.simpleMessage("前往下载"),
|
"goDownload": MessageLookupByLibrary.simpleMessage("前往下载"),
|
||||||
|
"goToConfigureScript": MessageLookupByLibrary.simpleMessage("前往配置脚本"),
|
||||||
"hasCacheChange": MessageLookupByLibrary.simpleMessage("是否缓存修改"),
|
"hasCacheChange": MessageLookupByLibrary.simpleMessage("是否缓存修改"),
|
||||||
"host": MessageLookupByLibrary.simpleMessage("主机"),
|
"host": MessageLookupByLibrary.simpleMessage("主机"),
|
||||||
"hostsDesc": MessageLookupByLibrary.simpleMessage("追加Hosts"),
|
"hostsDesc": MessageLookupByLibrary.simpleMessage("追加Hosts"),
|
||||||
@@ -244,6 +269,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"hotkeyManagement": MessageLookupByLibrary.simpleMessage("快捷键管理"),
|
"hotkeyManagement": MessageLookupByLibrary.simpleMessage("快捷键管理"),
|
||||||
"hotkeyManagementDesc": MessageLookupByLibrary.simpleMessage("使用键盘控制应用程序"),
|
"hotkeyManagementDesc": MessageLookupByLibrary.simpleMessage("使用键盘控制应用程序"),
|
||||||
"hours": MessageLookupByLibrary.simpleMessage("小时"),
|
"hours": MessageLookupByLibrary.simpleMessage("小时"),
|
||||||
|
"hoursAgo": m6,
|
||||||
"icon": MessageLookupByLibrary.simpleMessage("图片"),
|
"icon": MessageLookupByLibrary.simpleMessage("图片"),
|
||||||
"iconConfiguration": MessageLookupByLibrary.simpleMessage("图片配置"),
|
"iconConfiguration": MessageLookupByLibrary.simpleMessage("图片配置"),
|
||||||
"iconStyle": MessageLookupByLibrary.simpleMessage("图标样式"),
|
"iconStyle": MessageLookupByLibrary.simpleMessage("图标样式"),
|
||||||
@@ -263,6 +289,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"ipv6InboundDesc": MessageLookupByLibrary.simpleMessage("允许IPv6入站"),
|
"ipv6InboundDesc": MessageLookupByLibrary.simpleMessage("允许IPv6入站"),
|
||||||
"ja": MessageLookupByLibrary.simpleMessage("日语"),
|
"ja": MessageLookupByLibrary.simpleMessage("日语"),
|
||||||
"just": MessageLookupByLibrary.simpleMessage("刚刚"),
|
"just": MessageLookupByLibrary.simpleMessage("刚刚"),
|
||||||
|
"justNow": MessageLookupByLibrary.simpleMessage("刚刚"),
|
||||||
"keepAliveIntervalDesc": MessageLookupByLibrary.simpleMessage("TCP保持活动间隔"),
|
"keepAliveIntervalDesc": MessageLookupByLibrary.simpleMessage("TCP保持活动间隔"),
|
||||||
"key": MessageLookupByLibrary.simpleMessage("键"),
|
"key": MessageLookupByLibrary.simpleMessage("键"),
|
||||||
"language": MessageLookupByLibrary.simpleMessage("语言"),
|
"language": MessageLookupByLibrary.simpleMessage("语言"),
|
||||||
@@ -270,6 +297,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"light": MessageLookupByLibrary.simpleMessage("浅色"),
|
"light": MessageLookupByLibrary.simpleMessage("浅色"),
|
||||||
"list": MessageLookupByLibrary.simpleMessage("列表"),
|
"list": MessageLookupByLibrary.simpleMessage("列表"),
|
||||||
"listen": MessageLookupByLibrary.simpleMessage("监听"),
|
"listen": MessageLookupByLibrary.simpleMessage("监听"),
|
||||||
|
"loadTest": MessageLookupByLibrary.simpleMessage("加载测试"),
|
||||||
|
"loading": MessageLookupByLibrary.simpleMessage("加载中..."),
|
||||||
"local": MessageLookupByLibrary.simpleMessage("本地"),
|
"local": MessageLookupByLibrary.simpleMessage("本地"),
|
||||||
"localBackupDesc": MessageLookupByLibrary.simpleMessage("备份数据到本地"),
|
"localBackupDesc": MessageLookupByLibrary.simpleMessage("备份数据到本地"),
|
||||||
"localRecoveryDesc": MessageLookupByLibrary.simpleMessage("通过文件恢复数据"),
|
"localRecoveryDesc": MessageLookupByLibrary.simpleMessage("通过文件恢复数据"),
|
||||||
@@ -290,10 +319,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"minimizeOnExit": MessageLookupByLibrary.simpleMessage("退出时最小化"),
|
"minimizeOnExit": MessageLookupByLibrary.simpleMessage("退出时最小化"),
|
||||||
"minimizeOnExitDesc": MessageLookupByLibrary.simpleMessage("修改系统默认退出事件"),
|
"minimizeOnExitDesc": MessageLookupByLibrary.simpleMessage("修改系统默认退出事件"),
|
||||||
"minutes": MessageLookupByLibrary.simpleMessage("分钟"),
|
"minutes": MessageLookupByLibrary.simpleMessage("分钟"),
|
||||||
|
"minutesAgo": m7,
|
||||||
"mixedPort": MessageLookupByLibrary.simpleMessage("混合端口"),
|
"mixedPort": MessageLookupByLibrary.simpleMessage("混合端口"),
|
||||||
"mode": MessageLookupByLibrary.simpleMessage("模式"),
|
"mode": MessageLookupByLibrary.simpleMessage("模式"),
|
||||||
"monochromeScheme": MessageLookupByLibrary.simpleMessage("单色"),
|
"monochromeScheme": MessageLookupByLibrary.simpleMessage("单色"),
|
||||||
"months": MessageLookupByLibrary.simpleMessage("月"),
|
"months": MessageLookupByLibrary.simpleMessage("月"),
|
||||||
|
"monthsAgo": m8,
|
||||||
"more": MessageLookupByLibrary.simpleMessage("更多"),
|
"more": MessageLookupByLibrary.simpleMessage("更多"),
|
||||||
"name": MessageLookupByLibrary.simpleMessage("名称"),
|
"name": MessageLookupByLibrary.simpleMessage("名称"),
|
||||||
"nameSort": MessageLookupByLibrary.simpleMessage("按名称排序"),
|
"nameSort": MessageLookupByLibrary.simpleMessage("按名称排序"),
|
||||||
@@ -311,6 +342,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"noHotKey": MessageLookupByLibrary.simpleMessage("暂无快捷键"),
|
"noHotKey": MessageLookupByLibrary.simpleMessage("暂无快捷键"),
|
||||||
"noIcon": MessageLookupByLibrary.simpleMessage("无图标"),
|
"noIcon": MessageLookupByLibrary.simpleMessage("无图标"),
|
||||||
"noInfo": MessageLookupByLibrary.simpleMessage("暂无信息"),
|
"noInfo": MessageLookupByLibrary.simpleMessage("暂无信息"),
|
||||||
|
"noLongerRemind": MessageLookupByLibrary.simpleMessage("不再提示"),
|
||||||
"noMoreInfoDesc": MessageLookupByLibrary.simpleMessage("暂无更多信息"),
|
"noMoreInfoDesc": MessageLookupByLibrary.simpleMessage("暂无更多信息"),
|
||||||
"noNetwork": MessageLookupByLibrary.simpleMessage("无网络"),
|
"noNetwork": MessageLookupByLibrary.simpleMessage("无网络"),
|
||||||
"noNetworkApp": MessageLookupByLibrary.simpleMessage("无网络应用"),
|
"noNetworkApp": MessageLookupByLibrary.simpleMessage("无网络应用"),
|
||||||
@@ -320,8 +352,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"none": MessageLookupByLibrary.simpleMessage("无"),
|
"none": MessageLookupByLibrary.simpleMessage("无"),
|
||||||
"notSelectedTip": MessageLookupByLibrary.simpleMessage("当前代理组无法选中"),
|
"notSelectedTip": MessageLookupByLibrary.simpleMessage("当前代理组无法选中"),
|
||||||
"nullProfileDesc": MessageLookupByLibrary.simpleMessage("没有配置文件,请先添加配置文件"),
|
"nullProfileDesc": MessageLookupByLibrary.simpleMessage("没有配置文件,请先添加配置文件"),
|
||||||
"nullTip": m5,
|
"nullTip": m9,
|
||||||
"numberTip": m6,
|
"numberTip": m10,
|
||||||
"oneColumn": MessageLookupByLibrary.simpleMessage("一列"),
|
"oneColumn": MessageLookupByLibrary.simpleMessage("一列"),
|
||||||
"onlyIcon": MessageLookupByLibrary.simpleMessage("仅图标"),
|
"onlyIcon": MessageLookupByLibrary.simpleMessage("仅图标"),
|
||||||
"onlyOtherApps": MessageLookupByLibrary.simpleMessage("仅第三方应用"),
|
"onlyOtherApps": MessageLookupByLibrary.simpleMessage("仅第三方应用"),
|
||||||
@@ -338,7 +370,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"overrideDns": MessageLookupByLibrary.simpleMessage("覆写DNS"),
|
"overrideDns": MessageLookupByLibrary.simpleMessage("覆写DNS"),
|
||||||
"overrideDnsDesc": MessageLookupByLibrary.simpleMessage("开启后将覆盖配置中的DNS选项"),
|
"overrideDnsDesc": MessageLookupByLibrary.simpleMessage("开启后将覆盖配置中的DNS选项"),
|
||||||
"overrideInvalidTip": MessageLookupByLibrary.simpleMessage("在脚本模式下不生效"),
|
"overrideInvalidTip": MessageLookupByLibrary.simpleMessage("在脚本模式下不生效"),
|
||||||
|
"overrideMode": MessageLookupByLibrary.simpleMessage("覆写模式"),
|
||||||
"overrideOriginRules": MessageLookupByLibrary.simpleMessage("覆盖原始规则"),
|
"overrideOriginRules": MessageLookupByLibrary.simpleMessage("覆盖原始规则"),
|
||||||
|
"overrideScript": MessageLookupByLibrary.simpleMessage("覆写脚本"),
|
||||||
"palette": MessageLookupByLibrary.simpleMessage("调色板"),
|
"palette": MessageLookupByLibrary.simpleMessage("调色板"),
|
||||||
"password": MessageLookupByLibrary.simpleMessage("密码"),
|
"password": MessageLookupByLibrary.simpleMessage("密码"),
|
||||||
"paste": MessageLookupByLibrary.simpleMessage("粘贴"),
|
"paste": MessageLookupByLibrary.simpleMessage("粘贴"),
|
||||||
@@ -353,7 +387,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
),
|
),
|
||||||
"port": MessageLookupByLibrary.simpleMessage("端口"),
|
"port": MessageLookupByLibrary.simpleMessage("端口"),
|
||||||
"portConflictTip": MessageLookupByLibrary.simpleMessage("请输入不同的端口"),
|
"portConflictTip": MessageLookupByLibrary.simpleMessage("请输入不同的端口"),
|
||||||
"portTip": m7,
|
"portTip": m11,
|
||||||
"preferH3Desc": MessageLookupByLibrary.simpleMessage("优先使用DOH的http/3"),
|
"preferH3Desc": MessageLookupByLibrary.simpleMessage("优先使用DOH的http/3"),
|
||||||
"pressKeyboard": MessageLookupByLibrary.simpleMessage("请按下按键"),
|
"pressKeyboard": MessageLookupByLibrary.simpleMessage("请按下按键"),
|
||||||
"preview": MessageLookupByLibrary.simpleMessage("预览"),
|
"preview": MessageLookupByLibrary.simpleMessage("预览"),
|
||||||
@@ -403,6 +437,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"redirPort": MessageLookupByLibrary.simpleMessage("Redir端口"),
|
"redirPort": MessageLookupByLibrary.simpleMessage("Redir端口"),
|
||||||
"redo": MessageLookupByLibrary.simpleMessage("重做"),
|
"redo": MessageLookupByLibrary.simpleMessage("重做"),
|
||||||
"regExp": MessageLookupByLibrary.simpleMessage("正则"),
|
"regExp": MessageLookupByLibrary.simpleMessage("正则"),
|
||||||
|
"reload": MessageLookupByLibrary.simpleMessage("重载"),
|
||||||
"remote": MessageLookupByLibrary.simpleMessage("远程"),
|
"remote": MessageLookupByLibrary.simpleMessage("远程"),
|
||||||
"remoteBackupDesc": MessageLookupByLibrary.simpleMessage("备份数据到WebDAV"),
|
"remoteBackupDesc": MessageLookupByLibrary.simpleMessage("备份数据到WebDAV"),
|
||||||
"remoteDestination": MessageLookupByLibrary.simpleMessage("远程目标"),
|
"remoteDestination": MessageLookupByLibrary.simpleMessage("远程目标"),
|
||||||
@@ -413,6 +448,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"requests": MessageLookupByLibrary.simpleMessage("请求"),
|
"requests": MessageLookupByLibrary.simpleMessage("请求"),
|
||||||
"requestsDesc": MessageLookupByLibrary.simpleMessage("查看最近请求记录"),
|
"requestsDesc": MessageLookupByLibrary.simpleMessage("查看最近请求记录"),
|
||||||
"reset": MessageLookupByLibrary.simpleMessage("重置"),
|
"reset": MessageLookupByLibrary.simpleMessage("重置"),
|
||||||
|
"resetPageChangesTip": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"当前页面存在更改,确定重置吗?",
|
||||||
|
),
|
||||||
"resetTip": MessageLookupByLibrary.simpleMessage("确定要重置吗?"),
|
"resetTip": MessageLookupByLibrary.simpleMessage("确定要重置吗?"),
|
||||||
"resources": MessageLookupByLibrary.simpleMessage("资源"),
|
"resources": MessageLookupByLibrary.simpleMessage("资源"),
|
||||||
"resourcesDesc": MessageLookupByLibrary.simpleMessage("外部资源相关信息"),
|
"resourcesDesc": MessageLookupByLibrary.simpleMessage("外部资源相关信息"),
|
||||||
@@ -420,6 +458,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"respectRulesDesc": MessageLookupByLibrary.simpleMessage(
|
"respectRulesDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"DNS连接跟随rules,需配置proxy-server-nameserver",
|
"DNS连接跟随rules,需配置proxy-server-nameserver",
|
||||||
),
|
),
|
||||||
|
"restart": MessageLookupByLibrary.simpleMessage("重启"),
|
||||||
"restartCoreTip": MessageLookupByLibrary.simpleMessage("您确定要重启核心吗?"),
|
"restartCoreTip": MessageLookupByLibrary.simpleMessage("您确定要重启核心吗?"),
|
||||||
"routeAddress": MessageLookupByLibrary.simpleMessage("路由地址"),
|
"routeAddress": MessageLookupByLibrary.simpleMessage("路由地址"),
|
||||||
"routeAddressDesc": MessageLookupByLibrary.simpleMessage("配置监听路由地址"),
|
"routeAddressDesc": MessageLookupByLibrary.simpleMessage("配置监听路由地址"),
|
||||||
@@ -435,11 +474,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"saveChanges": MessageLookupByLibrary.simpleMessage("是否保存更改?"),
|
"saveChanges": MessageLookupByLibrary.simpleMessage("是否保存更改?"),
|
||||||
"saveTip": MessageLookupByLibrary.simpleMessage("确定要保存吗?"),
|
"saveTip": MessageLookupByLibrary.simpleMessage("确定要保存吗?"),
|
||||||
"script": MessageLookupByLibrary.simpleMessage("脚本"),
|
"script": MessageLookupByLibrary.simpleMessage("脚本"),
|
||||||
|
"scriptModeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"脚本模式,使用外部扩展脚本,提供一键覆写配置的能力",
|
||||||
|
),
|
||||||
"search": MessageLookupByLibrary.simpleMessage("搜索"),
|
"search": MessageLookupByLibrary.simpleMessage("搜索"),
|
||||||
"seconds": MessageLookupByLibrary.simpleMessage("秒"),
|
"seconds": MessageLookupByLibrary.simpleMessage("秒"),
|
||||||
"selectAll": MessageLookupByLibrary.simpleMessage("全选"),
|
"selectAll": MessageLookupByLibrary.simpleMessage("全选"),
|
||||||
"selected": MessageLookupByLibrary.simpleMessage("已选择"),
|
"selected": MessageLookupByLibrary.simpleMessage("已选择"),
|
||||||
"selectedCountTitle": m8,
|
"selectedCountTitle": m12,
|
||||||
"settings": MessageLookupByLibrary.simpleMessage("设置"),
|
"settings": MessageLookupByLibrary.simpleMessage("设置"),
|
||||||
"show": MessageLookupByLibrary.simpleMessage("显示"),
|
"show": MessageLookupByLibrary.simpleMessage("显示"),
|
||||||
"shrink": MessageLookupByLibrary.simpleMessage("紧凑"),
|
"shrink": MessageLookupByLibrary.simpleMessage("紧凑"),
|
||||||
@@ -452,8 +494,12 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"sourceIp": MessageLookupByLibrary.simpleMessage("源IP"),
|
"sourceIp": MessageLookupByLibrary.simpleMessage("源IP"),
|
||||||
"specialProxy": MessageLookupByLibrary.simpleMessage("特殊代理"),
|
"specialProxy": MessageLookupByLibrary.simpleMessage("特殊代理"),
|
||||||
"specialRules": MessageLookupByLibrary.simpleMessage("特殊规则"),
|
"specialRules": MessageLookupByLibrary.simpleMessage("特殊规则"),
|
||||||
|
"speedStatistics": MessageLookupByLibrary.simpleMessage("网速统计"),
|
||||||
"stackMode": MessageLookupByLibrary.simpleMessage("栈模式"),
|
"stackMode": MessageLookupByLibrary.simpleMessage("栈模式"),
|
||||||
"standard": MessageLookupByLibrary.simpleMessage("标准"),
|
"standard": MessageLookupByLibrary.simpleMessage("标准"),
|
||||||
|
"standardModeDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"标准模式,覆写基本配置,提供简单追加规则能力",
|
||||||
|
),
|
||||||
"start": MessageLookupByLibrary.simpleMessage("启动"),
|
"start": MessageLookupByLibrary.simpleMessage("启动"),
|
||||||
"startVpn": MessageLookupByLibrary.simpleMessage("正在启动VPN..."),
|
"startVpn": MessageLookupByLibrary.simpleMessage("正在启动VPN..."),
|
||||||
"status": MessageLookupByLibrary.simpleMessage("状态"),
|
"status": MessageLookupByLibrary.simpleMessage("状态"),
|
||||||
@@ -491,6 +537,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"trafficUsage": MessageLookupByLibrary.simpleMessage("流量统计"),
|
"trafficUsage": MessageLookupByLibrary.simpleMessage("流量统计"),
|
||||||
"tun": MessageLookupByLibrary.simpleMessage("虚拟网卡"),
|
"tun": MessageLookupByLibrary.simpleMessage("虚拟网卡"),
|
||||||
"tunDesc": MessageLookupByLibrary.simpleMessage("仅在管理员模式生效"),
|
"tunDesc": MessageLookupByLibrary.simpleMessage("仅在管理员模式生效"),
|
||||||
|
"turnOff": MessageLookupByLibrary.simpleMessage("关闭"),
|
||||||
|
"turnOn": MessageLookupByLibrary.simpleMessage("开启"),
|
||||||
"twoColumns": MessageLookupByLibrary.simpleMessage("两列"),
|
"twoColumns": MessageLookupByLibrary.simpleMessage("两列"),
|
||||||
"unableToUpdateCurrentProfileDesc": MessageLookupByLibrary.simpleMessage(
|
"unableToUpdateCurrentProfileDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"无法更新当前配置文件",
|
"无法更新当前配置文件",
|
||||||
@@ -504,12 +552,15 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"upload": MessageLookupByLibrary.simpleMessage("上传"),
|
"upload": MessageLookupByLibrary.simpleMessage("上传"),
|
||||||
"url": MessageLookupByLibrary.simpleMessage("URL"),
|
"url": MessageLookupByLibrary.simpleMessage("URL"),
|
||||||
"urlDesc": MessageLookupByLibrary.simpleMessage("通过URL获取配置文件"),
|
"urlDesc": MessageLookupByLibrary.simpleMessage("通过URL获取配置文件"),
|
||||||
"urlTip": m9,
|
"urlTip": m13,
|
||||||
"useHosts": MessageLookupByLibrary.simpleMessage("使用Hosts"),
|
"useHosts": MessageLookupByLibrary.simpleMessage("使用Hosts"),
|
||||||
"useSystemHosts": MessageLookupByLibrary.simpleMessage("使用系统Hosts"),
|
"useSystemHosts": MessageLookupByLibrary.simpleMessage("使用系统Hosts"),
|
||||||
"value": MessageLookupByLibrary.simpleMessage("值"),
|
"value": MessageLookupByLibrary.simpleMessage("值"),
|
||||||
"vibrantScheme": MessageLookupByLibrary.simpleMessage("活力"),
|
"vibrantScheme": MessageLookupByLibrary.simpleMessage("活力"),
|
||||||
"view": MessageLookupByLibrary.simpleMessage("查看"),
|
"view": MessageLookupByLibrary.simpleMessage("查看"),
|
||||||
|
"vpnConfigChangeDetected": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"检测到VPN相关配置改动",
|
||||||
|
),
|
||||||
"vpnDesc": MessageLookupByLibrary.simpleMessage("修改VPN相关设置"),
|
"vpnDesc": MessageLookupByLibrary.simpleMessage("修改VPN相关设置"),
|
||||||
"vpnEnableDesc": MessageLookupByLibrary.simpleMessage(
|
"vpnEnableDesc": MessageLookupByLibrary.simpleMessage(
|
||||||
"通过VpnService自动路由系统所有流量",
|
"通过VpnService自动路由系统所有流量",
|
||||||
@@ -521,6 +572,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"webDAVConfiguration": MessageLookupByLibrary.simpleMessage("WebDAV配置"),
|
"webDAVConfiguration": MessageLookupByLibrary.simpleMessage("WebDAV配置"),
|
||||||
"whitelistMode": MessageLookupByLibrary.simpleMessage("白名单模式"),
|
"whitelistMode": MessageLookupByLibrary.simpleMessage("白名单模式"),
|
||||||
"years": MessageLookupByLibrary.simpleMessage("年"),
|
"years": MessageLookupByLibrary.simpleMessage("年"),
|
||||||
|
"yearsAgo": m14,
|
||||||
"zh_CN": MessageLookupByLibrary.simpleMessage("中文简体"),
|
"zh_CN": MessageLookupByLibrary.simpleMessage("中文简体"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2619,6 +2619,26 @@ class AppLocalizations {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// `Advanced configuration`
|
||||||
|
String get advancedConfig {
|
||||||
|
return Intl.message(
|
||||||
|
'Advanced configuration',
|
||||||
|
name: 'advancedConfig',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Provide diverse configuration options`
|
||||||
|
String get advancedConfigDesc {
|
||||||
|
return Intl.message(
|
||||||
|
'Provide diverse configuration options',
|
||||||
|
name: 'advancedConfigDesc',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/// `{count} items have been selected`
|
/// `{count} items have been selected`
|
||||||
String selectedCountTitle(Object count) {
|
String selectedCountTitle(Object count) {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
@@ -3014,10 +3034,10 @@ class AppLocalizations {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `No {label} at the moment`
|
/// `No {label} yet`
|
||||||
String nullTip(Object label) {
|
String nullTip(Object label) {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'No $label at the moment',
|
'No $label yet',
|
||||||
name: 'nullTip',
|
name: 'nullTip',
|
||||||
desc: '',
|
desc: '',
|
||||||
args: [label],
|
args: [label],
|
||||||
@@ -3378,6 +3398,271 @@ class AppLocalizations {
|
|||||||
args: [],
|
args: [],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// `Edit rule`
|
||||||
|
String get editRule {
|
||||||
|
return Intl.message('Edit rule', name: 'editRule', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Override mode`
|
||||||
|
String get overrideMode {
|
||||||
|
return Intl.message(
|
||||||
|
'Override mode',
|
||||||
|
name: 'overrideMode',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Standard mode, override basic configuration, provide simple rule addition capability`
|
||||||
|
String get standardModeDesc {
|
||||||
|
return Intl.message(
|
||||||
|
'Standard mode, override basic configuration, provide simple rule addition capability',
|
||||||
|
name: 'standardModeDesc',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Script mode, use external extension scripts, provide one-click override configuration capability`
|
||||||
|
String get scriptModeDesc {
|
||||||
|
return Intl.message(
|
||||||
|
'Script mode, use external extension scripts, provide one-click override configuration capability',
|
||||||
|
name: 'scriptModeDesc',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Added rules`
|
||||||
|
String get addedRules {
|
||||||
|
return Intl.message('Added rules', name: 'addedRules', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Control global added rules`
|
||||||
|
String get controlGlobalAddedRules {
|
||||||
|
return Intl.message(
|
||||||
|
'Control global added rules',
|
||||||
|
name: 'controlGlobalAddedRules',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Override script`
|
||||||
|
String get overrideScript {
|
||||||
|
return Intl.message(
|
||||||
|
'Override script',
|
||||||
|
name: 'overrideScript',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Go to configure script`
|
||||||
|
String get goToConfigureScript {
|
||||||
|
return Intl.message(
|
||||||
|
'Go to configure script',
|
||||||
|
name: 'goToConfigureScript',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Edit global rules`
|
||||||
|
String get editGlobalRules {
|
||||||
|
return Intl.message(
|
||||||
|
'Edit global rules',
|
||||||
|
name: 'editGlobalRules',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `External fetch`
|
||||||
|
String get externalFetch {
|
||||||
|
return Intl.message(
|
||||||
|
'External fetch',
|
||||||
|
name: 'externalFetch',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Are you sure you want to force crash the core?`
|
||||||
|
String get confirmForceCrashCore {
|
||||||
|
return Intl.message(
|
||||||
|
'Are you sure you want to force crash the core?',
|
||||||
|
name: 'confirmForceCrashCore',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Are you sure you want to clear all data?`
|
||||||
|
String get confirmClearAllData {
|
||||||
|
return Intl.message(
|
||||||
|
'Are you sure you want to clear all data?',
|
||||||
|
name: 'confirmClearAllData',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Loading...`
|
||||||
|
String get loading {
|
||||||
|
return Intl.message('Loading...', name: 'loading', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Load test`
|
||||||
|
String get loadTest {
|
||||||
|
return Intl.message('Load test', name: 'loadTest', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `{count, plural, =1{1 year ago} other{{count} years ago}}`
|
||||||
|
String yearsAgo(num count) {
|
||||||
|
return Intl.plural(
|
||||||
|
count,
|
||||||
|
one: '1 year ago',
|
||||||
|
other: '$count years ago',
|
||||||
|
name: 'yearsAgo',
|
||||||
|
desc: '',
|
||||||
|
args: [count],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `{count, plural, =1{1 month ago} other{{count} months ago}}`
|
||||||
|
String monthsAgo(num count) {
|
||||||
|
return Intl.plural(
|
||||||
|
count,
|
||||||
|
one: '1 month ago',
|
||||||
|
other: '$count months ago',
|
||||||
|
name: 'monthsAgo',
|
||||||
|
desc: '',
|
||||||
|
args: [count],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `{count, plural, =1{1 day ago} other{{count} days ago}}`
|
||||||
|
String daysAgo(num count) {
|
||||||
|
return Intl.plural(
|
||||||
|
count,
|
||||||
|
one: '1 day ago',
|
||||||
|
other: '$count days ago',
|
||||||
|
name: 'daysAgo',
|
||||||
|
desc: '',
|
||||||
|
args: [count],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `{count, plural, =1{1 hour ago} other{{count} hours ago}}`
|
||||||
|
String hoursAgo(num count) {
|
||||||
|
return Intl.plural(
|
||||||
|
count,
|
||||||
|
one: '1 hour ago',
|
||||||
|
other: '$count hours ago',
|
||||||
|
name: 'hoursAgo',
|
||||||
|
desc: '',
|
||||||
|
args: [count],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `{count, plural, =1{1 minute ago} other{{count} minutes ago}}`
|
||||||
|
String minutesAgo(num count) {
|
||||||
|
return Intl.plural(
|
||||||
|
count,
|
||||||
|
one: '1 minute ago',
|
||||||
|
other: '$count minutes ago',
|
||||||
|
name: 'minutesAgo',
|
||||||
|
desc: '',
|
||||||
|
args: [count],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Just now`
|
||||||
|
String get justNow {
|
||||||
|
return Intl.message('Just now', name: 'justNow', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Don't remind again`
|
||||||
|
String get noLongerRemind {
|
||||||
|
return Intl.message(
|
||||||
|
'Don\'t remind again',
|
||||||
|
name: 'noLongerRemind',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Access Control Settings`
|
||||||
|
String get accessControlSettings {
|
||||||
|
return Intl.message(
|
||||||
|
'Access Control Settings',
|
||||||
|
name: 'accessControlSettings',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Turn On`
|
||||||
|
String get turnOn {
|
||||||
|
return Intl.message('Turn On', name: 'turnOn', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Turn Off`
|
||||||
|
String get turnOff {
|
||||||
|
return Intl.message('Turn Off', name: 'turnOff', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Core configuration change detected`
|
||||||
|
String get coreConfigChangeDetected {
|
||||||
|
return Intl.message(
|
||||||
|
'Core configuration change detected',
|
||||||
|
name: 'coreConfigChangeDetected',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Reload`
|
||||||
|
String get reload {
|
||||||
|
return Intl.message('Reload', name: 'reload', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `VPN configuration change detected`
|
||||||
|
String get vpnConfigChangeDetected {
|
||||||
|
return Intl.message(
|
||||||
|
'VPN configuration change detected',
|
||||||
|
name: 'vpnConfigChangeDetected',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Restart`
|
||||||
|
String get restart {
|
||||||
|
return Intl.message('Restart', name: 'restart', desc: '', args: []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Speed statistics`
|
||||||
|
String get speedStatistics {
|
||||||
|
return Intl.message(
|
||||||
|
'Speed statistics',
|
||||||
|
name: 'speedStatistics',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `The current page has changes. Are you sure you want to reset?`
|
||||||
|
String get resetPageChangesTip {
|
||||||
|
return Intl.message(
|
||||||
|
'The current page has changes. Are you sure you want to reset?',
|
||||||
|
name: 'resetPageChangesTip',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AppLocalizationDelegate extends LocalizationsDelegate<AppLocalizations> {
|
class AppLocalizationDelegate extends LocalizationsDelegate<AppLocalizations> {
|
||||||
|
|||||||
@@ -39,8 +39,12 @@ Future<void> _service(List<String> flags) async {
|
|||||||
final clashConfig = globalState.config.patchClashConfig.copyWith.tun(
|
final clashConfig = globalState.config.patchClashConfig.copyWith.tun(
|
||||||
enable: false,
|
enable: false,
|
||||||
);
|
);
|
||||||
coreController.setupConfig(
|
final setupState = globalState.getSetupState(
|
||||||
clashConfig,
|
globalState.config.currentProfileId,
|
||||||
|
);
|
||||||
|
globalState.setupConfig(
|
||||||
|
setupState: setupState,
|
||||||
|
patchConfig: clashConfig,
|
||||||
preloadInvoke: () {
|
preloadInvoke: () {
|
||||||
globalState.handleStart();
|
globalState.handleStart();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -87,7 +87,9 @@ class _CoreContainerState extends ConsumerState<CoreManager>
|
|||||||
ref
|
ref
|
||||||
.read(providersProvider.notifier)
|
.read(providersProvider.notifier)
|
||||||
.setProvider(await coreController.getExternalProvider(providerName));
|
.setProvider(await coreController.getExternalProvider(providerName));
|
||||||
globalState.appController.updateGroupsDebounce();
|
debouncer.call(FunctionTag.loadedProvider, () async {
|
||||||
|
globalState.appController.updateGroupsDebounce();
|
||||||
|
}, duration: const Duration(milliseconds: 5000));
|
||||||
super.onLoaded(providerName);
|
super.onLoaded(providerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ export 'android_manager.dart';
|
|||||||
export 'app_manager.dart';
|
export 'app_manager.dart';
|
||||||
export 'connectivity_manager.dart';
|
export 'connectivity_manager.dart';
|
||||||
export 'core_manager.dart';
|
export 'core_manager.dart';
|
||||||
export 'message_manager.dart';
|
|
||||||
export 'proxy_manager.dart';
|
export 'proxy_manager.dart';
|
||||||
|
export 'status_manager.dart';
|
||||||
export 'theme_manager.dart';
|
export 'theme_manager.dart';
|
||||||
export 'tile_manager.dart';
|
export 'tile_manager.dart';
|
||||||
export 'tray_manager.dart';
|
export 'tray_manager.dart';
|
||||||
|
|||||||
@@ -1,151 +0,0 @@
|
|||||||
import 'dart:async';
|
|
||||||
import 'dart:collection';
|
|
||||||
import 'dart:math';
|
|
||||||
|
|
||||||
import 'package:fl_clash/common/common.dart';
|
|
||||||
import 'package:fl_clash/models/models.dart';
|
|
||||||
import 'package:fl_clash/widgets/fade_box.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class MessageManager extends StatefulWidget {
|
|
||||||
final Widget child;
|
|
||||||
|
|
||||||
const MessageManager({super.key, required this.child});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MessageManager> createState() => MessageManagerState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class MessageManagerState extends State<MessageManager> {
|
|
||||||
final _messagesNotifier = ValueNotifier<List<CommonMessage>>([]);
|
|
||||||
final _bufferMessages = Queue<CommonMessage>();
|
|
||||||
final _activeTimers = <String, Timer>{};
|
|
||||||
bool _isDisplayingMessage = false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_messagesNotifier.dispose();
|
|
||||||
for (final timer in _activeTimers.values) {
|
|
||||||
timer.cancel();
|
|
||||||
}
|
|
||||||
_activeTimers.clear();
|
|
||||||
_bufferMessages.clear();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
void message(String text) {
|
|
||||||
final commonMessage = CommonMessage(id: utils.uuidV4, text: text);
|
|
||||||
_bufferMessages.add(commonMessage);
|
|
||||||
commonPrint.log('message: $text');
|
|
||||||
_processQueue();
|
|
||||||
}
|
|
||||||
|
|
||||||
void _cancelMessage(String id) {
|
|
||||||
_bufferMessages.removeWhere((msg) => msg.id == id);
|
|
||||||
if (_activeTimers.containsKey(id)) {
|
|
||||||
_removeMessage(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _processQueue() {
|
|
||||||
if (_isDisplayingMessage || _bufferMessages.isEmpty) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_isDisplayingMessage = true;
|
|
||||||
final message = _bufferMessages.removeFirst();
|
|
||||||
_messagesNotifier.value = List.from(_messagesNotifier.value)..add(message);
|
|
||||||
final timer = Timer(message.duration, () {
|
|
||||||
_removeMessage(message.id);
|
|
||||||
});
|
|
||||||
_activeTimers[message.id] = timer;
|
|
||||||
}
|
|
||||||
|
|
||||||
void _removeMessage(String id) {
|
|
||||||
_activeTimers.remove(id)?.cancel();
|
|
||||||
final currentMessages = List<CommonMessage>.from(_messagesNotifier.value);
|
|
||||||
currentMessages.removeWhere((msg) => msg.id == id);
|
|
||||||
_messagesNotifier.value = currentMessages;
|
|
||||||
_isDisplayingMessage = false;
|
|
||||||
_processQueue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Stack(
|
|
||||||
children: [
|
|
||||||
widget.child,
|
|
||||||
ValueListenableBuilder(
|
|
||||||
valueListenable: _messagesNotifier,
|
|
||||||
builder: (_, messages, _) {
|
|
||||||
return Container(
|
|
||||||
margin: EdgeInsets.only(
|
|
||||||
top: kToolbarHeight + 12,
|
|
||||||
left: 12,
|
|
||||||
right: 12,
|
|
||||||
),
|
|
||||||
child: FadeThroughBox(
|
|
||||||
alignment: Alignment.topRight,
|
|
||||||
child: messages.isEmpty
|
|
||||||
? SizedBox()
|
|
||||||
: LayoutBuilder(
|
|
||||||
key: Key(messages.last.id),
|
|
||||||
builder: (_, constraints) {
|
|
||||||
return Dismissible(
|
|
||||||
key: ValueKey(messages.last.id),
|
|
||||||
onDismissed: (_) {
|
|
||||||
_cancelMessage(messages.last.id);
|
|
||||||
},
|
|
||||||
child: Card(
|
|
||||||
shape: const RoundedSuperellipseBorder(
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(14),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
elevation: 10,
|
|
||||||
color: context.colorScheme.surfaceContainerHigh,
|
|
||||||
child: Container(
|
|
||||||
width: min(constraints.maxWidth, 500),
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
horizontal: 16,
|
|
||||||
vertical: 8,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Flexible(
|
|
||||||
child: Text(
|
|
||||||
messages.last.text,
|
|
||||||
maxLines: 3,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 16),
|
|
||||||
IconButton(
|
|
||||||
padding: EdgeInsets.all(2),
|
|
||||||
visualDensity: VisualDensity.compact,
|
|
||||||
onPressed: () {
|
|
||||||
_cancelMessage(messages.last.id);
|
|
||||||
},
|
|
||||||
icon: Icon(Icons.close),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
262
lib/manager/status_manager.dart
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'dart:collection';
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:fl_clash/common/common.dart';
|
||||||
|
import 'package:fl_clash/models/models.dart';
|
||||||
|
import 'package:fl_clash/providers/providers.dart';
|
||||||
|
import 'package:fl_clash/widgets/fade_box.dart';
|
||||||
|
import 'package:fl_clash/widgets/loading.dart';
|
||||||
|
import 'package:fl_clash/widgets/theme.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
|
||||||
|
class StatusManager extends StatefulWidget {
|
||||||
|
final Widget child;
|
||||||
|
|
||||||
|
const StatusManager({super.key, required this.child});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<StatusManager> createState() => StatusManagerState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class StatusManagerState extends State<StatusManager> {
|
||||||
|
final _messagesNotifier = ValueNotifier<List<CommonMessage>>([]);
|
||||||
|
final _bufferMessages = Queue<CommonMessage>();
|
||||||
|
final _activeTimers = <String, Timer>{};
|
||||||
|
bool _isDisplayingMessage = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_messagesNotifier.dispose();
|
||||||
|
for (final timer in _activeTimers.values) {
|
||||||
|
timer.cancel();
|
||||||
|
}
|
||||||
|
_activeTimers.clear();
|
||||||
|
_bufferMessages.clear();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void message(String text, {MessageActionState? actionState}) {
|
||||||
|
final commonMessage = CommonMessage(
|
||||||
|
id: utils.uuidV4,
|
||||||
|
text: text,
|
||||||
|
actionState: actionState,
|
||||||
|
);
|
||||||
|
_bufferMessages.add(commonMessage);
|
||||||
|
commonPrint.log('message: $text');
|
||||||
|
_processQueue();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _cancelMessage(String id) {
|
||||||
|
_bufferMessages.removeWhere((msg) => msg.id == id);
|
||||||
|
if (_activeTimers.containsKey(id)) {
|
||||||
|
_removeMessage(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _processQueue() {
|
||||||
|
if (_isDisplayingMessage || _bufferMessages.isEmpty) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_isDisplayingMessage = true;
|
||||||
|
final message = _bufferMessages.removeFirst();
|
||||||
|
_messagesNotifier.value = List.from(_messagesNotifier.value)..add(message);
|
||||||
|
final timer = Timer(message.duration, () {
|
||||||
|
_removeMessage(message.id);
|
||||||
|
});
|
||||||
|
_activeTimers[message.id] = timer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _removeMessage(String id) {
|
||||||
|
_activeTimers.remove(id)?.cancel();
|
||||||
|
final currentMessages = List<CommonMessage>.from(_messagesNotifier.value);
|
||||||
|
currentMessages.removeWhere((msg) => msg.id == id);
|
||||||
|
_messagesNotifier.value = currentMessages;
|
||||||
|
_isDisplayingMessage = false;
|
||||||
|
_processQueue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Stack(
|
||||||
|
children: [
|
||||||
|
widget.child,
|
||||||
|
Consumer(
|
||||||
|
builder: (_, ref, child) {
|
||||||
|
final top = ref.watch(overlayTopOffsetProvider);
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: top + MediaQuery.of(context).viewPadding.top + 8,
|
||||||
|
),
|
||||||
|
child: child,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
child: AnimatedSize(
|
||||||
|
duration: animateDuration,
|
||||||
|
child: ValueListenableBuilder(
|
||||||
|
valueListenable: _messagesNotifier,
|
||||||
|
builder: (_, messages, _) {
|
||||||
|
return FadeThroughBox(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: messages.isEmpty
|
||||||
|
? SizedBox()
|
||||||
|
: LayoutBuilder(
|
||||||
|
key: Key(messages.last.id),
|
||||||
|
builder: (_, constraints) {
|
||||||
|
return Dismissible(
|
||||||
|
key: ValueKey(messages.last.id),
|
||||||
|
onDismissed: (_) {
|
||||||
|
_cancelMessage(messages.last.id);
|
||||||
|
},
|
||||||
|
child: Card(
|
||||||
|
shape: const RoundedSuperellipseBorder(
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(14),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
elevation: 10,
|
||||||
|
color: context
|
||||||
|
.colorScheme
|
||||||
|
.surfaceContainerHigh,
|
||||||
|
child: Container(
|
||||||
|
width: min(constraints.maxWidth, 500),
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 54,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 16,
|
||||||
|
vertical: 8,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Flexible(
|
||||||
|
child: Text(
|
||||||
|
messages.last.text,
|
||||||
|
maxLines: 3,
|
||||||
|
style: context
|
||||||
|
.textTheme
|
||||||
|
.labelLarge
|
||||||
|
?.copyWith(
|
||||||
|
color: context
|
||||||
|
.colorScheme
|
||||||
|
.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 16),
|
||||||
|
if (messages.last.actionState !=
|
||||||
|
null)
|
||||||
|
CommonMinFilledButtonTheme(
|
||||||
|
child: FilledButton.tonal(
|
||||||
|
onPressed: () async {
|
||||||
|
_cancelMessage(
|
||||||
|
messages.last.id,
|
||||||
|
);
|
||||||
|
messages.last.actionState!
|
||||||
|
.action();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
messages
|
||||||
|
.last
|
||||||
|
.actionState!
|
||||||
|
.actionText,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
LoadingIndicator(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LoadingIndicator extends ConsumerWidget {
|
||||||
|
const LoadingIndicator({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, ref) {
|
||||||
|
final loading = ref.watch(loadingProvider);
|
||||||
|
final isMobileView = ref.watch(isMobileViewProvider);
|
||||||
|
return AnimatedSwitcher(
|
||||||
|
switchInCurve: Curves.easeIn,
|
||||||
|
switchOutCurve: Curves.easeOut,
|
||||||
|
duration: midDuration,
|
||||||
|
transitionBuilder: (Widget child, Animation<double> animation) {
|
||||||
|
return SlideTransition(
|
||||||
|
position: Tween<Offset>(
|
||||||
|
begin: const Offset(1, 0),
|
||||||
|
end: Offset.zero,
|
||||||
|
).animate(animation),
|
||||||
|
child: child,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: loading && isMobileView
|
||||||
|
? Container(
|
||||||
|
height: 54,
|
||||||
|
margin: EdgeInsets.only(top: 8, left: 14, right: 14),
|
||||||
|
child: Material(
|
||||||
|
elevation: 3,
|
||||||
|
color: context.colorScheme.surfaceContainer,
|
||||||
|
surfaceTintColor: context.colorScheme.surfaceTint,
|
||||||
|
shape: const RoundedSuperellipseBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(14)),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
spacing: 12,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Flexible(
|
||||||
|
child: Text(
|
||||||
|
context.appLocalizations.loading,
|
||||||
|
style: context.textTheme.labelLarge?.copyWith(
|
||||||
|
color: context.colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 32,
|
||||||
|
width: 32,
|
||||||
|
child: CommonCircleLoading(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: SizedBox(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,10 +8,7 @@ import 'package:tray_manager/tray_manager.dart';
|
|||||||
class TrayManager extends ConsumerStatefulWidget {
|
class TrayManager extends ConsumerStatefulWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
||||||
const TrayManager({
|
const TrayManager({super.key, required this.child});
|
||||||
super.key,
|
|
||||||
required this.child,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ConsumerState<TrayManager> createState() => _TrayContainerState();
|
ConsumerState<TrayManager> createState() => _TrayContainerState();
|
||||||
@@ -22,14 +19,21 @@ class _TrayContainerState extends ConsumerState<TrayManager> with TrayListener {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
trayManager.addListener(this);
|
trayManager.addListener(this);
|
||||||
ref.listenManual(
|
ref.listenManual(trayStateProvider, (prev, next) {
|
||||||
trayStateProvider,
|
if (prev != next) {
|
||||||
(prev, next) {
|
globalState.appController.updateTray();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (system.isMacOS) {
|
||||||
|
ref.listenManual(trayTitleStateProvider, (prev, next) {
|
||||||
if (prev != next) {
|
if (prev != next) {
|
||||||
globalState.appController.updateTray();
|
tray?.updateTrayTitle(
|
||||||
|
showTrayTitle: next.showTrayTitle,
|
||||||
|
traffic: next.traffic,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:fl_clash/common/common.dart';
|
import 'package:fl_clash/common/common.dart';
|
||||||
import 'package:fl_clash/enum/enum.dart';
|
import 'package:fl_clash/enum/enum.dart';
|
||||||
|
import 'package:fl_clash/models/models.dart';
|
||||||
import 'package:fl_clash/providers/state.dart';
|
import 'package:fl_clash/providers/state.dart';
|
||||||
import 'package:fl_clash/state.dart';
|
import 'package:fl_clash/state.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -19,17 +20,29 @@ class _VpnContainerState extends ConsumerState<VpnManager> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
ref.listenManual(vpnStateProvider, (prev, next) {
|
ref.listenManual(vpnStateProvider, (prev, next) {
|
||||||
showTip();
|
if (prev != next) {
|
||||||
|
showTip(next);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void showTip() {
|
void showTip(VpnState state) {
|
||||||
throttler.call(
|
throttler.call(
|
||||||
FunctionTag.vpnTip,
|
FunctionTag.vpnTip,
|
||||||
() {
|
() {
|
||||||
if (ref.read(isStartProvider)) {
|
if (!ref.read(isStartProvider) || state == globalState.lastVpnState) {
|
||||||
globalState.showNotifier(appLocalizations.vpnTip);
|
return;
|
||||||
}
|
}
|
||||||
|
globalState.showNotifier(
|
||||||
|
appLocalizations.vpnConfigChangeDetected,
|
||||||
|
actionState: MessageActionState(
|
||||||
|
actionText: appLocalizations.restart,
|
||||||
|
action: () async {
|
||||||
|
await globalState.handleStop();
|
||||||
|
await globalState.appController.updateStatus(true);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
duration: const Duration(seconds: 6),
|
duration: const Duration(seconds: 6),
|
||||||
fire: true,
|
fire: true,
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ abstract class AppState with _$AppState {
|
|||||||
required SystemUiOverlayStyle systemUiOverlayStyle,
|
required SystemUiOverlayStyle systemUiOverlayStyle,
|
||||||
ProfileOverrideModel? profileOverrideModel,
|
ProfileOverrideModel? profileOverrideModel,
|
||||||
@Default({}) Map<QueryTag, String> queryMap,
|
@Default({}) Map<QueryTag, String> queryMap,
|
||||||
|
@Default({}) Map<String, String> selectedItemMap,
|
||||||
|
@Default({}) Map<String, Set<String>> selectedItemsMap,
|
||||||
@Default(CoreStatus.connecting) CoreStatus coreStatus,
|
@Default(CoreStatus.connecting) CoreStatus coreStatus,
|
||||||
}) = _AppState;
|
}) = _AppState;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import 'package:freezed_annotation/freezed_annotation.dart';
|
|||||||
part 'generated/clash_config.freezed.dart';
|
part 'generated/clash_config.freezed.dart';
|
||||||
part 'generated/clash_config.g.dart';
|
part 'generated/clash_config.g.dart';
|
||||||
|
|
||||||
typedef HostsMap = Map<String, String>;
|
|
||||||
|
|
||||||
const defaultClashConfig = ClashConfig();
|
const defaultClashConfig = ClashConfig();
|
||||||
|
|
||||||
const defaultTun = Tun();
|
const defaultTun = Tun();
|
||||||
@@ -386,6 +384,19 @@ abstract class Rule with _$Rule {
|
|||||||
factory Rule.fromJson(Map<String, Object?> json) => _$RuleFromJson(json);
|
factory Rule.fromJson(Map<String, Object?> json) => _$RuleFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension RulesExt on List<Rule> {
|
||||||
|
List<Rule> updateWith(Rule rule) {
|
||||||
|
var newList = List<Rule>.from(this);
|
||||||
|
final index = newList.indexWhere((item) => item.id == rule.id);
|
||||||
|
if (index != -1) {
|
||||||
|
newList[index] = rule;
|
||||||
|
} else {
|
||||||
|
newList.insert(0, rule);
|
||||||
|
}
|
||||||
|
return newList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class SubRule with _$SubRule {
|
abstract class SubRule with _$SubRule {
|
||||||
const factory SubRule({required String name}) = _SubRule;
|
const factory SubRule({required String name}) = _SubRule;
|
||||||
@@ -463,7 +474,7 @@ abstract class ClashConfig with _$ClashConfig {
|
|||||||
@Default(ExternalControllerStatus.close)
|
@Default(ExternalControllerStatus.close)
|
||||||
@JsonKey(name: 'external-controller')
|
@JsonKey(name: 'external-controller')
|
||||||
ExternalControllerStatus externalController,
|
ExternalControllerStatus externalController,
|
||||||
@Default({}) HostsMap hosts,
|
@Default({}) Map<String, String> hosts,
|
||||||
}) = _ClashConfig;
|
}) = _ClashConfig;
|
||||||
|
|
||||||
factory ClashConfig.fromJson(Map<String, Object?> json) =>
|
factory ClashConfig.fromJson(Map<String, Object?> json) =>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:collection/collection.dart';
|
||||||
import 'package:fl_clash/common/common.dart';
|
import 'package:fl_clash/common/common.dart';
|
||||||
import 'package:fl_clash/enum/enum.dart';
|
import 'package:fl_clash/enum/enum.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -34,6 +35,33 @@ abstract class Package with _$Package {
|
|||||||
_$PackageFromJson(json);
|
_$PackageFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension PackagesExt on List<Package> {
|
||||||
|
List<Package> getViewList({
|
||||||
|
required List<String> pinedList,
|
||||||
|
required AccessSortType sortType,
|
||||||
|
required bool isFilterSystemApp,
|
||||||
|
required bool isFilterNonInternetApp,
|
||||||
|
}) {
|
||||||
|
return where(
|
||||||
|
(item) =>
|
||||||
|
(isFilterSystemApp ? item.system == false : true) &&
|
||||||
|
(isFilterNonInternetApp ? item.internet == true : true),
|
||||||
|
).sorted((a, b) {
|
||||||
|
final isSelectA = pinedList.contains(a.packageName);
|
||||||
|
final isSelectB = pinedList.contains(b.packageName);
|
||||||
|
|
||||||
|
if (isSelectA != isSelectB) {
|
||||||
|
return isSelectA ? -1 : 1;
|
||||||
|
}
|
||||||
|
return switch (sortType) {
|
||||||
|
AccessSortType.none => 0,
|
||||||
|
AccessSortType.name => a.label.compareTo(b.label),
|
||||||
|
AccessSortType.time => b.lastUpdateTime.compareTo(a.lastUpdateTime),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class Metadata with _$Metadata {
|
abstract class Metadata with _$Metadata {
|
||||||
const factory Metadata({
|
const factory Metadata({
|
||||||
@@ -237,6 +265,10 @@ extension TrafficExt on Traffic {
|
|||||||
return '${up.traffic.show} ↑ ${down.traffic.show} ↓';
|
return '${up.traffic.show} ↑ ${down.traffic.show} ↓';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String get trayTitle {
|
||||||
|
return '${up.shortTraffic.show}/s \n ${down.shortTraffic.show}/s';
|
||||||
|
}
|
||||||
|
|
||||||
num get speed => up + down;
|
num get speed => up + down;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,20 +455,20 @@ abstract class Field with _$Field {
|
|||||||
}) = _Field;
|
}) = _Field;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum PopupMenuItemType { primary, danger }
|
|
||||||
|
|
||||||
class PopupMenuItemData {
|
class PopupMenuItemData {
|
||||||
const PopupMenuItemData({
|
const PopupMenuItemData({
|
||||||
this.icon,
|
this.icon,
|
||||||
required this.label,
|
required this.label,
|
||||||
required this.onPressed,
|
this.onPressed,
|
||||||
this.danger = false,
|
this.danger = false,
|
||||||
|
this.subItems = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
final VoidCallback? onPressed;
|
final VoidCallback? onPressed;
|
||||||
final IconData? icon;
|
final IconData? icon;
|
||||||
final bool danger;
|
final bool danger;
|
||||||
|
final List<PopupMenuItemData> subItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
@@ -492,6 +524,19 @@ abstract class Script with _$Script {
|
|||||||
factory Script.fromJson(Map<String, Object?> json) => _$ScriptFromJson(json);
|
factory Script.fromJson(Map<String, Object?> json) => _$ScriptFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension ScriptsExt on List<Script> {
|
||||||
|
Script? get(String? id) {
|
||||||
|
if (id == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
final index = indexWhere((script) => script.id == id);
|
||||||
|
if (index != -1) {
|
||||||
|
return this[index];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class DelayState with _$DelayState {
|
abstract class DelayState with _$DelayState {
|
||||||
const factory DelayState({required int delay, required bool group}) =
|
const factory DelayState({required int delay, required bool group}) =
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ abstract class AppSettingProps with _$AppSettingProps {
|
|||||||
@Default(false) bool hidden,
|
@Default(false) bool hidden,
|
||||||
@Default(false) bool developerMode,
|
@Default(false) bool developerMode,
|
||||||
@Default(RecoveryStrategy.compatible) RecoveryStrategy recoveryStrategy,
|
@Default(RecoveryStrategy.compatible) RecoveryStrategy recoveryStrategy,
|
||||||
|
@Default(true) bool showTrayTitle,
|
||||||
}) = _AppSettingProps;
|
}) = _AppSettingProps;
|
||||||
|
|
||||||
factory AppSettingProps.fromJson(Map<String, Object?> json) =>
|
factory AppSettingProps.fromJson(Map<String, Object?> json) =>
|
||||||
@@ -116,13 +117,18 @@ extension AccessControlExt on AccessControl {
|
|||||||
AccessControlMode.acceptSelected => acceptList,
|
AccessControlMode.acceptSelected => acceptList,
|
||||||
AccessControlMode.rejectSelected => rejectList,
|
AccessControlMode.rejectSelected => rejectList,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
AccessControl copyWithNewList(List<String> value) => switch (mode) {
|
||||||
|
AccessControlMode.acceptSelected => copyWith(acceptList: value),
|
||||||
|
AccessControlMode.rejectSelected => copyWith(rejectList: value),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class WindowProps with _$WindowProps {
|
abstract class WindowProps with _$WindowProps {
|
||||||
const factory WindowProps({
|
const factory WindowProps({
|
||||||
@Default(750) double width,
|
@Default(0) double width,
|
||||||
@Default(600) double height,
|
@Default(0) double height,
|
||||||
double? top,
|
double? top,
|
||||||
double? left,
|
double? left,
|
||||||
}) = _WindowProps;
|
}) = _WindowProps;
|
||||||
@@ -131,6 +137,12 @@ abstract class WindowProps with _$WindowProps {
|
|||||||
json == null ? const WindowProps() : _$WindowPropsFromJson(json);
|
json == null ? const WindowProps() : _$WindowPropsFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension WindowPropsExt on WindowProps {
|
||||||
|
Size get _size => Size(width, height);
|
||||||
|
|
||||||
|
Size get size => _size.isEmpty ? Size(680, 580) : _size;
|
||||||
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class VpnProps with _$VpnProps {
|
abstract class VpnProps with _$VpnProps {
|
||||||
const factory VpnProps({
|
const factory VpnProps({
|
||||||
@@ -168,7 +180,6 @@ abstract class ProxiesStyle with _$ProxiesStyle {
|
|||||||
@Default(ProxiesLayout.standard) ProxiesLayout layout,
|
@Default(ProxiesLayout.standard) ProxiesLayout layout,
|
||||||
@Default(ProxiesIconStyle.standard) ProxiesIconStyle iconStyle,
|
@Default(ProxiesIconStyle.standard) ProxiesIconStyle iconStyle,
|
||||||
@Default(ProxyCardType.expand) ProxyCardType cardType,
|
@Default(ProxyCardType.expand) ProxyCardType cardType,
|
||||||
@Default({}) Map<String, String> iconMap,
|
|
||||||
}) = _ProxiesStyle;
|
}) = _ProxiesStyle;
|
||||||
|
|
||||||
factory ProxiesStyle.fromJson(Map<String, Object?>? json) =>
|
factory ProxiesStyle.fromJson(Map<String, Object?>? json) =>
|
||||||
@@ -223,24 +234,6 @@ abstract class ScriptProps with _$ScriptProps {
|
|||||||
_$ScriptPropsFromJson(json);
|
_$ScriptPropsFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ScriptPropsExt on ScriptProps {
|
|
||||||
String? get realId {
|
|
||||||
final index = scripts.indexWhere((script) => script.id == currentId);
|
|
||||||
if (index != -1) {
|
|
||||||
return currentId;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Script? get currentScript {
|
|
||||||
final index = scripts.indexWhere((script) => script.id == currentId);
|
|
||||||
if (index != -1) {
|
|
||||||
return scripts[index];
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class Config with _$Config {
|
abstract class Config with _$Config {
|
||||||
const factory Config({
|
const factory Config({
|
||||||
@@ -258,7 +251,8 @@ abstract class Config with _$Config {
|
|||||||
@Default(defaultProxiesStyle) ProxiesStyle proxiesStyle,
|
@Default(defaultProxiesStyle) ProxiesStyle proxiesStyle,
|
||||||
@Default(defaultWindowProps) WindowProps windowProps,
|
@Default(defaultWindowProps) WindowProps windowProps,
|
||||||
@Default(defaultClashConfig) ClashConfig patchClashConfig,
|
@Default(defaultClashConfig) ClashConfig patchClashConfig,
|
||||||
@Default(ScriptProps()) ScriptProps scriptProps,
|
@Default([]) List<Script> scripts,
|
||||||
|
@Default([]) List<Rule> rules,
|
||||||
}) = _Config;
|
}) = _Config;
|
||||||
|
|
||||||
factory Config.fromJson(Map<String, Object?> json) => _$ConfigFromJson(json);
|
factory Config.fromJson(Map<String, Object?> json) => _$ConfigFromJson(json);
|
||||||
@@ -273,6 +267,12 @@ abstract class Config with _$Config {
|
|||||||
(json['vpnProps'] as Map)['accessControl'] = accessControlMap;
|
(json['vpnProps'] as Map)['accessControl'] = accessControlMap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (json['scripts'] == null) {
|
||||||
|
final scriptPropsJson = json['scriptProps'] as Map<String, Object?>?;
|
||||||
|
if (scriptPropsJson != null) {
|
||||||
|
json['scripts'] = scriptPropsJson['scripts'];
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
return Config.fromJson(json);
|
return Config.fromJson(json);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$AppState {
|
mixin _$AppState {
|
||||||
|
|
||||||
bool get isInit; bool get backBlock; PageLabel get pageLabel; List<Package> get packages; int get sortNum; Size get viewSize; double get sideWidth; DelayMap get delayMap; List<Group> get groups; int get checkIpNum; Brightness get brightness; int? get runTime; List<ExternalProvider> get providers; String? get localIp; FixedList<TrackerInfo> get requests; int get version; FixedList<Log> get logs; FixedList<Traffic> get traffics; Traffic get totalTraffic; bool get realTunEnable; bool get loading; SystemUiOverlayStyle get systemUiOverlayStyle; ProfileOverrideModel? get profileOverrideModel; Map<QueryTag, String> get queryMap; CoreStatus get coreStatus;
|
bool get isInit; bool get backBlock; PageLabel get pageLabel; List<Package> get packages; int get sortNum; Size get viewSize; double get sideWidth; DelayMap get delayMap; List<Group> get groups; int get checkIpNum; Brightness get brightness; int? get runTime; List<ExternalProvider> get providers; String? get localIp; FixedList<TrackerInfo> get requests; int get version; FixedList<Log> get logs; FixedList<Traffic> get traffics; Traffic get totalTraffic; bool get realTunEnable; bool get loading; SystemUiOverlayStyle get systemUiOverlayStyle; ProfileOverrideModel? get profileOverrideModel; Map<QueryTag, String> get queryMap; Map<String, String> get selectedItemMap; Map<String, Set<String>> get selectedItemsMap; CoreStatus get coreStatus;
|
||||||
/// Create a copy of AppState
|
/// Create a copy of AppState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -25,16 +25,16 @@ $AppStateCopyWith<AppState> get copyWith => _$AppStateCopyWithImpl<AppState>(thi
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppState&&(identical(other.isInit, isInit) || other.isInit == isInit)&&(identical(other.backBlock, backBlock) || other.backBlock == backBlock)&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&const DeepCollectionEquality().equals(other.packages, packages)&&(identical(other.sortNum, sortNum) || other.sortNum == sortNum)&&(identical(other.viewSize, viewSize) || other.viewSize == viewSize)&&(identical(other.sideWidth, sideWidth) || other.sideWidth == sideWidth)&&const DeepCollectionEquality().equals(other.delayMap, delayMap)&&const DeepCollectionEquality().equals(other.groups, groups)&&(identical(other.checkIpNum, checkIpNum) || other.checkIpNum == checkIpNum)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&(identical(other.runTime, runTime) || other.runTime == runTime)&&const DeepCollectionEquality().equals(other.providers, providers)&&(identical(other.localIp, localIp) || other.localIp == localIp)&&(identical(other.requests, requests) || other.requests == requests)&&(identical(other.version, version) || other.version == version)&&(identical(other.logs, logs) || other.logs == logs)&&(identical(other.traffics, traffics) || other.traffics == traffics)&&(identical(other.totalTraffic, totalTraffic) || other.totalTraffic == totalTraffic)&&(identical(other.realTunEnable, realTunEnable) || other.realTunEnable == realTunEnable)&&(identical(other.loading, loading) || other.loading == loading)&&(identical(other.systemUiOverlayStyle, systemUiOverlayStyle) || other.systemUiOverlayStyle == systemUiOverlayStyle)&&(identical(other.profileOverrideModel, profileOverrideModel) || other.profileOverrideModel == profileOverrideModel)&&const DeepCollectionEquality().equals(other.queryMap, queryMap)&&(identical(other.coreStatus, coreStatus) || other.coreStatus == coreStatus));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppState&&(identical(other.isInit, isInit) || other.isInit == isInit)&&(identical(other.backBlock, backBlock) || other.backBlock == backBlock)&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&const DeepCollectionEquality().equals(other.packages, packages)&&(identical(other.sortNum, sortNum) || other.sortNum == sortNum)&&(identical(other.viewSize, viewSize) || other.viewSize == viewSize)&&(identical(other.sideWidth, sideWidth) || other.sideWidth == sideWidth)&&const DeepCollectionEquality().equals(other.delayMap, delayMap)&&const DeepCollectionEquality().equals(other.groups, groups)&&(identical(other.checkIpNum, checkIpNum) || other.checkIpNum == checkIpNum)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&(identical(other.runTime, runTime) || other.runTime == runTime)&&const DeepCollectionEquality().equals(other.providers, providers)&&(identical(other.localIp, localIp) || other.localIp == localIp)&&(identical(other.requests, requests) || other.requests == requests)&&(identical(other.version, version) || other.version == version)&&(identical(other.logs, logs) || other.logs == logs)&&(identical(other.traffics, traffics) || other.traffics == traffics)&&(identical(other.totalTraffic, totalTraffic) || other.totalTraffic == totalTraffic)&&(identical(other.realTunEnable, realTunEnable) || other.realTunEnable == realTunEnable)&&(identical(other.loading, loading) || other.loading == loading)&&(identical(other.systemUiOverlayStyle, systemUiOverlayStyle) || other.systemUiOverlayStyle == systemUiOverlayStyle)&&(identical(other.profileOverrideModel, profileOverrideModel) || other.profileOverrideModel == profileOverrideModel)&&const DeepCollectionEquality().equals(other.queryMap, queryMap)&&const DeepCollectionEquality().equals(other.selectedItemMap, selectedItemMap)&&const DeepCollectionEquality().equals(other.selectedItemsMap, selectedItemsMap)&&(identical(other.coreStatus, coreStatus) || other.coreStatus == coreStatus));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([runtimeType,isInit,backBlock,pageLabel,const DeepCollectionEquality().hash(packages),sortNum,viewSize,sideWidth,const DeepCollectionEquality().hash(delayMap),const DeepCollectionEquality().hash(groups),checkIpNum,brightness,runTime,const DeepCollectionEquality().hash(providers),localIp,requests,version,logs,traffics,totalTraffic,realTunEnable,loading,systemUiOverlayStyle,profileOverrideModel,const DeepCollectionEquality().hash(queryMap),coreStatus]);
|
int get hashCode => Object.hashAll([runtimeType,isInit,backBlock,pageLabel,const DeepCollectionEquality().hash(packages),sortNum,viewSize,sideWidth,const DeepCollectionEquality().hash(delayMap),const DeepCollectionEquality().hash(groups),checkIpNum,brightness,runTime,const DeepCollectionEquality().hash(providers),localIp,requests,version,logs,traffics,totalTraffic,realTunEnable,loading,systemUiOverlayStyle,profileOverrideModel,const DeepCollectionEquality().hash(queryMap),const DeepCollectionEquality().hash(selectedItemMap),const DeepCollectionEquality().hash(selectedItemsMap),coreStatus]);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AppState(isInit: $isInit, backBlock: $backBlock, pageLabel: $pageLabel, packages: $packages, sortNum: $sortNum, viewSize: $viewSize, sideWidth: $sideWidth, delayMap: $delayMap, groups: $groups, checkIpNum: $checkIpNum, brightness: $brightness, runTime: $runTime, providers: $providers, localIp: $localIp, requests: $requests, version: $version, logs: $logs, traffics: $traffics, totalTraffic: $totalTraffic, realTunEnable: $realTunEnable, loading: $loading, systemUiOverlayStyle: $systemUiOverlayStyle, profileOverrideModel: $profileOverrideModel, queryMap: $queryMap, coreStatus: $coreStatus)';
|
return 'AppState(isInit: $isInit, backBlock: $backBlock, pageLabel: $pageLabel, packages: $packages, sortNum: $sortNum, viewSize: $viewSize, sideWidth: $sideWidth, delayMap: $delayMap, groups: $groups, checkIpNum: $checkIpNum, brightness: $brightness, runTime: $runTime, providers: $providers, localIp: $localIp, requests: $requests, version: $version, logs: $logs, traffics: $traffics, totalTraffic: $totalTraffic, realTunEnable: $realTunEnable, loading: $loading, systemUiOverlayStyle: $systemUiOverlayStyle, profileOverrideModel: $profileOverrideModel, queryMap: $queryMap, selectedItemMap: $selectedItemMap, selectedItemsMap: $selectedItemsMap, coreStatus: $coreStatus)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ abstract mixin class $AppStateCopyWith<$Res> {
|
|||||||
factory $AppStateCopyWith(AppState value, $Res Function(AppState) _then) = _$AppStateCopyWithImpl;
|
factory $AppStateCopyWith(AppState value, $Res Function(AppState) _then) = _$AppStateCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, CoreStatus coreStatus
|
bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, Map<String, String> selectedItemMap, Map<String, Set<String>> selectedItemsMap, CoreStatus coreStatus
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ class _$AppStateCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of AppState
|
/// Create a copy of AppState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? isInit = null,Object? backBlock = null,Object? pageLabel = null,Object? packages = null,Object? sortNum = null,Object? viewSize = null,Object? sideWidth = null,Object? delayMap = null,Object? groups = null,Object? checkIpNum = null,Object? brightness = null,Object? runTime = freezed,Object? providers = null,Object? localIp = freezed,Object? requests = null,Object? version = null,Object? logs = null,Object? traffics = null,Object? totalTraffic = null,Object? realTunEnable = null,Object? loading = null,Object? systemUiOverlayStyle = null,Object? profileOverrideModel = freezed,Object? queryMap = null,Object? coreStatus = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? isInit = null,Object? backBlock = null,Object? pageLabel = null,Object? packages = null,Object? sortNum = null,Object? viewSize = null,Object? sideWidth = null,Object? delayMap = null,Object? groups = null,Object? checkIpNum = null,Object? brightness = null,Object? runTime = freezed,Object? providers = null,Object? localIp = freezed,Object? requests = null,Object? version = null,Object? logs = null,Object? traffics = null,Object? totalTraffic = null,Object? realTunEnable = null,Object? loading = null,Object? systemUiOverlayStyle = null,Object? profileOverrideModel = freezed,Object? queryMap = null,Object? selectedItemMap = null,Object? selectedItemsMap = null,Object? coreStatus = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
isInit: null == isInit ? _self.isInit : isInit // ignore: cast_nullable_to_non_nullable
|
isInit: null == isInit ? _self.isInit : isInit // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,backBlock: null == backBlock ? _self.backBlock : backBlock // ignore: cast_nullable_to_non_nullable
|
as bool,backBlock: null == backBlock ? _self.backBlock : backBlock // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -88,7 +88,9 @@ as bool,loading: null == loading ? _self.loading : loading // ignore: cast_nulla
|
|||||||
as bool,systemUiOverlayStyle: null == systemUiOverlayStyle ? _self.systemUiOverlayStyle : systemUiOverlayStyle // ignore: cast_nullable_to_non_nullable
|
as bool,systemUiOverlayStyle: null == systemUiOverlayStyle ? _self.systemUiOverlayStyle : systemUiOverlayStyle // ignore: cast_nullable_to_non_nullable
|
||||||
as SystemUiOverlayStyle,profileOverrideModel: freezed == profileOverrideModel ? _self.profileOverrideModel : profileOverrideModel // ignore: cast_nullable_to_non_nullable
|
as SystemUiOverlayStyle,profileOverrideModel: freezed == profileOverrideModel ? _self.profileOverrideModel : profileOverrideModel // ignore: cast_nullable_to_non_nullable
|
||||||
as ProfileOverrideModel?,queryMap: null == queryMap ? _self.queryMap : queryMap // ignore: cast_nullable_to_non_nullable
|
as ProfileOverrideModel?,queryMap: null == queryMap ? _self.queryMap : queryMap // ignore: cast_nullable_to_non_nullable
|
||||||
as Map<QueryTag, String>,coreStatus: null == coreStatus ? _self.coreStatus : coreStatus // ignore: cast_nullable_to_non_nullable
|
as Map<QueryTag, String>,selectedItemMap: null == selectedItemMap ? _self.selectedItemMap : selectedItemMap // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Map<String, String>,selectedItemsMap: null == selectedItemsMap ? _self.selectedItemsMap : selectedItemsMap // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Map<String, Set<String>>,coreStatus: null == coreStatus ? _self.coreStatus : coreStatus // ignore: cast_nullable_to_non_nullable
|
||||||
as CoreStatus,
|
as CoreStatus,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -195,10 +197,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, CoreStatus coreStatus)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, Map<String, String> selectedItemMap, Map<String, Set<String>> selectedItemsMap, CoreStatus coreStatus)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppState() when $default != null:
|
case _AppState() when $default != null:
|
||||||
return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.profileOverrideModel,_that.queryMap,_that.coreStatus);case _:
|
return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.profileOverrideModel,_that.queryMap,_that.selectedItemMap,_that.selectedItemsMap,_that.coreStatus);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -216,10 +218,10 @@ return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_tha
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, CoreStatus coreStatus) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, Map<String, String> selectedItemMap, Map<String, Set<String>> selectedItemsMap, CoreStatus coreStatus) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppState():
|
case _AppState():
|
||||||
return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.profileOverrideModel,_that.queryMap,_that.coreStatus);case _:
|
return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.profileOverrideModel,_that.queryMap,_that.selectedItemMap,_that.selectedItemsMap,_that.coreStatus);case _:
|
||||||
throw StateError('Unexpected subclass');
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -236,10 +238,10 @@ return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_tha
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, CoreStatus coreStatus)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, Map<String, String> selectedItemMap, Map<String, Set<String>> selectedItemsMap, CoreStatus coreStatus)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppState() when $default != null:
|
case _AppState() when $default != null:
|
||||||
return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.profileOverrideModel,_that.queryMap,_that.coreStatus);case _:
|
return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.profileOverrideModel,_that.queryMap,_that.selectedItemMap,_that.selectedItemsMap,_that.coreStatus);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -251,7 +253,7 @@ return $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_tha
|
|||||||
|
|
||||||
|
|
||||||
class _AppState implements AppState {
|
class _AppState implements AppState {
|
||||||
const _AppState({this.isInit = false, this.backBlock = false, this.pageLabel = PageLabel.dashboard, final List<Package> packages = const [], this.sortNum = 0, required this.viewSize, this.sideWidth = 0, final DelayMap delayMap = const {}, final List<Group> groups = const [], this.checkIpNum = 0, required this.brightness, this.runTime, final List<ExternalProvider> providers = const [], this.localIp, required this.requests, required this.version, required this.logs, required this.traffics, required this.totalTraffic, this.realTunEnable = false, this.loading = false, required this.systemUiOverlayStyle, this.profileOverrideModel, final Map<QueryTag, String> queryMap = const {}, this.coreStatus = CoreStatus.connecting}): _packages = packages,_delayMap = delayMap,_groups = groups,_providers = providers,_queryMap = queryMap;
|
const _AppState({this.isInit = false, this.backBlock = false, this.pageLabel = PageLabel.dashboard, final List<Package> packages = const [], this.sortNum = 0, required this.viewSize, this.sideWidth = 0, final DelayMap delayMap = const {}, final List<Group> groups = const [], this.checkIpNum = 0, required this.brightness, this.runTime, final List<ExternalProvider> providers = const [], this.localIp, required this.requests, required this.version, required this.logs, required this.traffics, required this.totalTraffic, this.realTunEnable = false, this.loading = false, required this.systemUiOverlayStyle, this.profileOverrideModel, final Map<QueryTag, String> queryMap = const {}, final Map<String, String> selectedItemMap = const {}, final Map<String, Set<String>> selectedItemsMap = const {}, this.coreStatus = CoreStatus.connecting}): _packages = packages,_delayMap = delayMap,_groups = groups,_providers = providers,_queryMap = queryMap,_selectedItemMap = selectedItemMap,_selectedItemsMap = selectedItemsMap;
|
||||||
|
|
||||||
|
|
||||||
@override@JsonKey() final bool isInit;
|
@override@JsonKey() final bool isInit;
|
||||||
@@ -308,6 +310,20 @@ class _AppState implements AppState {
|
|||||||
return EqualUnmodifiableMapView(_queryMap);
|
return EqualUnmodifiableMapView(_queryMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Map<String, String> _selectedItemMap;
|
||||||
|
@override@JsonKey() Map<String, String> get selectedItemMap {
|
||||||
|
if (_selectedItemMap is EqualUnmodifiableMapView) return _selectedItemMap;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableMapView(_selectedItemMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
final Map<String, Set<String>> _selectedItemsMap;
|
||||||
|
@override@JsonKey() Map<String, Set<String>> get selectedItemsMap {
|
||||||
|
if (_selectedItemsMap is EqualUnmodifiableMapView) return _selectedItemsMap;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableMapView(_selectedItemsMap);
|
||||||
|
}
|
||||||
|
|
||||||
@override@JsonKey() final CoreStatus coreStatus;
|
@override@JsonKey() final CoreStatus coreStatus;
|
||||||
|
|
||||||
/// Create a copy of AppState
|
/// Create a copy of AppState
|
||||||
@@ -320,16 +336,16 @@ _$AppStateCopyWith<_AppState> get copyWith => __$AppStateCopyWithImpl<_AppState>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppState&&(identical(other.isInit, isInit) || other.isInit == isInit)&&(identical(other.backBlock, backBlock) || other.backBlock == backBlock)&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&const DeepCollectionEquality().equals(other._packages, _packages)&&(identical(other.sortNum, sortNum) || other.sortNum == sortNum)&&(identical(other.viewSize, viewSize) || other.viewSize == viewSize)&&(identical(other.sideWidth, sideWidth) || other.sideWidth == sideWidth)&&const DeepCollectionEquality().equals(other._delayMap, _delayMap)&&const DeepCollectionEquality().equals(other._groups, _groups)&&(identical(other.checkIpNum, checkIpNum) || other.checkIpNum == checkIpNum)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&(identical(other.runTime, runTime) || other.runTime == runTime)&&const DeepCollectionEquality().equals(other._providers, _providers)&&(identical(other.localIp, localIp) || other.localIp == localIp)&&(identical(other.requests, requests) || other.requests == requests)&&(identical(other.version, version) || other.version == version)&&(identical(other.logs, logs) || other.logs == logs)&&(identical(other.traffics, traffics) || other.traffics == traffics)&&(identical(other.totalTraffic, totalTraffic) || other.totalTraffic == totalTraffic)&&(identical(other.realTunEnable, realTunEnable) || other.realTunEnable == realTunEnable)&&(identical(other.loading, loading) || other.loading == loading)&&(identical(other.systemUiOverlayStyle, systemUiOverlayStyle) || other.systemUiOverlayStyle == systemUiOverlayStyle)&&(identical(other.profileOverrideModel, profileOverrideModel) || other.profileOverrideModel == profileOverrideModel)&&const DeepCollectionEquality().equals(other._queryMap, _queryMap)&&(identical(other.coreStatus, coreStatus) || other.coreStatus == coreStatus));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppState&&(identical(other.isInit, isInit) || other.isInit == isInit)&&(identical(other.backBlock, backBlock) || other.backBlock == backBlock)&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&const DeepCollectionEquality().equals(other._packages, _packages)&&(identical(other.sortNum, sortNum) || other.sortNum == sortNum)&&(identical(other.viewSize, viewSize) || other.viewSize == viewSize)&&(identical(other.sideWidth, sideWidth) || other.sideWidth == sideWidth)&&const DeepCollectionEquality().equals(other._delayMap, _delayMap)&&const DeepCollectionEquality().equals(other._groups, _groups)&&(identical(other.checkIpNum, checkIpNum) || other.checkIpNum == checkIpNum)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&(identical(other.runTime, runTime) || other.runTime == runTime)&&const DeepCollectionEquality().equals(other._providers, _providers)&&(identical(other.localIp, localIp) || other.localIp == localIp)&&(identical(other.requests, requests) || other.requests == requests)&&(identical(other.version, version) || other.version == version)&&(identical(other.logs, logs) || other.logs == logs)&&(identical(other.traffics, traffics) || other.traffics == traffics)&&(identical(other.totalTraffic, totalTraffic) || other.totalTraffic == totalTraffic)&&(identical(other.realTunEnable, realTunEnable) || other.realTunEnable == realTunEnable)&&(identical(other.loading, loading) || other.loading == loading)&&(identical(other.systemUiOverlayStyle, systemUiOverlayStyle) || other.systemUiOverlayStyle == systemUiOverlayStyle)&&(identical(other.profileOverrideModel, profileOverrideModel) || other.profileOverrideModel == profileOverrideModel)&&const DeepCollectionEquality().equals(other._queryMap, _queryMap)&&const DeepCollectionEquality().equals(other._selectedItemMap, _selectedItemMap)&&const DeepCollectionEquality().equals(other._selectedItemsMap, _selectedItemsMap)&&(identical(other.coreStatus, coreStatus) || other.coreStatus == coreStatus));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([runtimeType,isInit,backBlock,pageLabel,const DeepCollectionEquality().hash(_packages),sortNum,viewSize,sideWidth,const DeepCollectionEquality().hash(_delayMap),const DeepCollectionEquality().hash(_groups),checkIpNum,brightness,runTime,const DeepCollectionEquality().hash(_providers),localIp,requests,version,logs,traffics,totalTraffic,realTunEnable,loading,systemUiOverlayStyle,profileOverrideModel,const DeepCollectionEquality().hash(_queryMap),coreStatus]);
|
int get hashCode => Object.hashAll([runtimeType,isInit,backBlock,pageLabel,const DeepCollectionEquality().hash(_packages),sortNum,viewSize,sideWidth,const DeepCollectionEquality().hash(_delayMap),const DeepCollectionEquality().hash(_groups),checkIpNum,brightness,runTime,const DeepCollectionEquality().hash(_providers),localIp,requests,version,logs,traffics,totalTraffic,realTunEnable,loading,systemUiOverlayStyle,profileOverrideModel,const DeepCollectionEquality().hash(_queryMap),const DeepCollectionEquality().hash(_selectedItemMap),const DeepCollectionEquality().hash(_selectedItemsMap),coreStatus]);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AppState(isInit: $isInit, backBlock: $backBlock, pageLabel: $pageLabel, packages: $packages, sortNum: $sortNum, viewSize: $viewSize, sideWidth: $sideWidth, delayMap: $delayMap, groups: $groups, checkIpNum: $checkIpNum, brightness: $brightness, runTime: $runTime, providers: $providers, localIp: $localIp, requests: $requests, version: $version, logs: $logs, traffics: $traffics, totalTraffic: $totalTraffic, realTunEnable: $realTunEnable, loading: $loading, systemUiOverlayStyle: $systemUiOverlayStyle, profileOverrideModel: $profileOverrideModel, queryMap: $queryMap, coreStatus: $coreStatus)';
|
return 'AppState(isInit: $isInit, backBlock: $backBlock, pageLabel: $pageLabel, packages: $packages, sortNum: $sortNum, viewSize: $viewSize, sideWidth: $sideWidth, delayMap: $delayMap, groups: $groups, checkIpNum: $checkIpNum, brightness: $brightness, runTime: $runTime, providers: $providers, localIp: $localIp, requests: $requests, version: $version, logs: $logs, traffics: $traffics, totalTraffic: $totalTraffic, realTunEnable: $realTunEnable, loading: $loading, systemUiOverlayStyle: $systemUiOverlayStyle, profileOverrideModel: $profileOverrideModel, queryMap: $queryMap, selectedItemMap: $selectedItemMap, selectedItemsMap: $selectedItemsMap, coreStatus: $coreStatus)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -340,7 +356,7 @@ abstract mixin class _$AppStateCopyWith<$Res> implements $AppStateCopyWith<$Res>
|
|||||||
factory _$AppStateCopyWith(_AppState value, $Res Function(_AppState) _then) = __$AppStateCopyWithImpl;
|
factory _$AppStateCopyWith(_AppState value, $Res Function(_AppState) _then) = __$AppStateCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, CoreStatus coreStatus
|
bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, ProfileOverrideModel? profileOverrideModel, Map<QueryTag, String> queryMap, Map<String, String> selectedItemMap, Map<String, Set<String>> selectedItemsMap, CoreStatus coreStatus
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -357,7 +373,7 @@ class __$AppStateCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of AppState
|
/// Create a copy of AppState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? isInit = null,Object? backBlock = null,Object? pageLabel = null,Object? packages = null,Object? sortNum = null,Object? viewSize = null,Object? sideWidth = null,Object? delayMap = null,Object? groups = null,Object? checkIpNum = null,Object? brightness = null,Object? runTime = freezed,Object? providers = null,Object? localIp = freezed,Object? requests = null,Object? version = null,Object? logs = null,Object? traffics = null,Object? totalTraffic = null,Object? realTunEnable = null,Object? loading = null,Object? systemUiOverlayStyle = null,Object? profileOverrideModel = freezed,Object? queryMap = null,Object? coreStatus = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? isInit = null,Object? backBlock = null,Object? pageLabel = null,Object? packages = null,Object? sortNum = null,Object? viewSize = null,Object? sideWidth = null,Object? delayMap = null,Object? groups = null,Object? checkIpNum = null,Object? brightness = null,Object? runTime = freezed,Object? providers = null,Object? localIp = freezed,Object? requests = null,Object? version = null,Object? logs = null,Object? traffics = null,Object? totalTraffic = null,Object? realTunEnable = null,Object? loading = null,Object? systemUiOverlayStyle = null,Object? profileOverrideModel = freezed,Object? queryMap = null,Object? selectedItemMap = null,Object? selectedItemsMap = null,Object? coreStatus = null,}) {
|
||||||
return _then(_AppState(
|
return _then(_AppState(
|
||||||
isInit: null == isInit ? _self.isInit : isInit // ignore: cast_nullable_to_non_nullable
|
isInit: null == isInit ? _self.isInit : isInit // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,backBlock: null == backBlock ? _self.backBlock : backBlock // ignore: cast_nullable_to_non_nullable
|
as bool,backBlock: null == backBlock ? _self.backBlock : backBlock // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -383,7 +399,9 @@ as bool,loading: null == loading ? _self.loading : loading // ignore: cast_nulla
|
|||||||
as bool,systemUiOverlayStyle: null == systemUiOverlayStyle ? _self.systemUiOverlayStyle : systemUiOverlayStyle // ignore: cast_nullable_to_non_nullable
|
as bool,systemUiOverlayStyle: null == systemUiOverlayStyle ? _self.systemUiOverlayStyle : systemUiOverlayStyle // ignore: cast_nullable_to_non_nullable
|
||||||
as SystemUiOverlayStyle,profileOverrideModel: freezed == profileOverrideModel ? _self.profileOverrideModel : profileOverrideModel // ignore: cast_nullable_to_non_nullable
|
as SystemUiOverlayStyle,profileOverrideModel: freezed == profileOverrideModel ? _self.profileOverrideModel : profileOverrideModel // ignore: cast_nullable_to_non_nullable
|
||||||
as ProfileOverrideModel?,queryMap: null == queryMap ? _self._queryMap : queryMap // ignore: cast_nullable_to_non_nullable
|
as ProfileOverrideModel?,queryMap: null == queryMap ? _self._queryMap : queryMap // ignore: cast_nullable_to_non_nullable
|
||||||
as Map<QueryTag, String>,coreStatus: null == coreStatus ? _self.coreStatus : coreStatus // ignore: cast_nullable_to_non_nullable
|
as Map<QueryTag, String>,selectedItemMap: null == selectedItemMap ? _self._selectedItemMap : selectedItemMap // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Map<String, String>,selectedItemsMap: null == selectedItemsMap ? _self._selectedItemsMap : selectedItemsMap // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Map<String, Set<String>>,coreStatus: null == coreStatus ? _self.coreStatus : coreStatus // ignore: cast_nullable_to_non_nullable
|
||||||
as CoreStatus,
|
as CoreStatus,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3523,7 +3523,7 @@ as List<SubRule>,
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$ClashConfig {
|
mixin _$ClashConfig {
|
||||||
|
|
||||||
@JsonKey(name: 'mixed-port') int get mixedPort;@JsonKey(name: 'socks-port') int get socksPort;@JsonKey(name: 'port') int get port;@JsonKey(name: 'redir-port') int get redirPort;@JsonKey(name: 'tproxy-port') int get tproxyPort; Mode get mode;@JsonKey(name: 'allow-lan') bool get allowLan;@JsonKey(name: 'log-level') LogLevel get logLevel; bool get ipv6;@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode get findProcessMode;@JsonKey(name: 'keep-alive-interval') int get keepAliveInterval;@JsonKey(name: 'unified-delay') bool get unifiedDelay;@JsonKey(name: 'tcp-concurrent') bool get tcpConcurrent;@JsonKey(fromJson: Tun.safeFormJson) Tun get tun;@JsonKey(fromJson: Dns.safeDnsFromJson) Dns get dns;@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl get geoXUrl;@JsonKey(name: 'geodata-loader') GeodataLoader get geodataLoader;@JsonKey(name: 'proxy-groups') List<ProxyGroup> get proxyGroups; List<String> get rule;@JsonKey(name: 'global-ua') String? get globalUa;@JsonKey(name: 'external-controller') ExternalControllerStatus get externalController; HostsMap get hosts;
|
@JsonKey(name: 'mixed-port') int get mixedPort;@JsonKey(name: 'socks-port') int get socksPort;@JsonKey(name: 'port') int get port;@JsonKey(name: 'redir-port') int get redirPort;@JsonKey(name: 'tproxy-port') int get tproxyPort; Mode get mode;@JsonKey(name: 'allow-lan') bool get allowLan;@JsonKey(name: 'log-level') LogLevel get logLevel; bool get ipv6;@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode get findProcessMode;@JsonKey(name: 'keep-alive-interval') int get keepAliveInterval;@JsonKey(name: 'unified-delay') bool get unifiedDelay;@JsonKey(name: 'tcp-concurrent') bool get tcpConcurrent;@JsonKey(fromJson: Tun.safeFormJson) Tun get tun;@JsonKey(fromJson: Dns.safeDnsFromJson) Dns get dns;@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl get geoXUrl;@JsonKey(name: 'geodata-loader') GeodataLoader get geodataLoader;@JsonKey(name: 'proxy-groups') List<ProxyGroup> get proxyGroups; List<String> get rule;@JsonKey(name: 'global-ua') String? get globalUa;@JsonKey(name: 'external-controller') ExternalControllerStatus get externalController; Map<String, String> get hosts;
|
||||||
/// Create a copy of ClashConfig
|
/// Create a copy of ClashConfig
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -3556,7 +3556,7 @@ abstract mixin class $ClashConfigCopyWith<$Res> {
|
|||||||
factory $ClashConfigCopyWith(ClashConfig value, $Res Function(ClashConfig) _then) = _$ClashConfigCopyWithImpl;
|
factory $ClashConfigCopyWith(ClashConfig value, $Res Function(ClashConfig) _then) = _$ClashConfigCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
@JsonKey(name: 'mixed-port') int mixedPort,@JsonKey(name: 'socks-port') int socksPort,@JsonKey(name: 'port') int port,@JsonKey(name: 'redir-port') int redirPort,@JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode,@JsonKey(name: 'allow-lan') bool allowLan,@JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6,@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode,@JsonKey(name: 'keep-alive-interval') int keepAliveInterval,@JsonKey(name: 'unified-delay') bool unifiedDelay,@JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,@JsonKey(fromJson: Tun.safeFormJson) Tun tun,@JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns,@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl,@JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader,@JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule,@JsonKey(name: 'global-ua') String? globalUa,@JsonKey(name: 'external-controller') ExternalControllerStatus externalController, HostsMap hosts
|
@JsonKey(name: 'mixed-port') int mixedPort,@JsonKey(name: 'socks-port') int socksPort,@JsonKey(name: 'port') int port,@JsonKey(name: 'redir-port') int redirPort,@JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode,@JsonKey(name: 'allow-lan') bool allowLan,@JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6,@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode,@JsonKey(name: 'keep-alive-interval') int keepAliveInterval,@JsonKey(name: 'unified-delay') bool unifiedDelay,@JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,@JsonKey(fromJson: Tun.safeFormJson) Tun tun,@JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns,@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl,@JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader,@JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule,@JsonKey(name: 'global-ua') String? globalUa,@JsonKey(name: 'external-controller') ExternalControllerStatus externalController, Map<String, String> hosts
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -3597,7 +3597,7 @@ as List<ProxyGroup>,rule: null == rule ? _self.rule : rule // ignore: cast_nulla
|
|||||||
as List<String>,globalUa: freezed == globalUa ? _self.globalUa : globalUa // ignore: cast_nullable_to_non_nullable
|
as List<String>,globalUa: freezed == globalUa ? _self.globalUa : globalUa // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,externalController: null == externalController ? _self.externalController : externalController // ignore: cast_nullable_to_non_nullable
|
as String?,externalController: null == externalController ? _self.externalController : externalController // ignore: cast_nullable_to_non_nullable
|
||||||
as ExternalControllerStatus,hosts: null == hosts ? _self.hosts : hosts // ignore: cast_nullable_to_non_nullable
|
as ExternalControllerStatus,hosts: null == hosts ? _self.hosts : hosts // ignore: cast_nullable_to_non_nullable
|
||||||
as HostsMap,
|
as Map<String, String>,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
/// Create a copy of ClashConfig
|
/// Create a copy of ClashConfig
|
||||||
@@ -3709,7 +3709,7 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'mixed-port') int mixedPort, @JsonKey(name: 'socks-port') int socksPort, @JsonKey(name: 'port') int port, @JsonKey(name: 'redir-port') int redirPort, @JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode, @JsonKey(name: 'allow-lan') bool allowLan, @JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval') int keepAliveInterval, @JsonKey(name: 'unified-delay') bool unifiedDelay, @JsonKey(name: 'tcp-concurrent') bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson) Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule, @JsonKey(name: 'global-ua') String? globalUa, @JsonKey(name: 'external-controller') ExternalControllerStatus externalController, HostsMap hosts)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'mixed-port') int mixedPort, @JsonKey(name: 'socks-port') int socksPort, @JsonKey(name: 'port') int port, @JsonKey(name: 'redir-port') int redirPort, @JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode, @JsonKey(name: 'allow-lan') bool allowLan, @JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval') int keepAliveInterval, @JsonKey(name: 'unified-delay') bool unifiedDelay, @JsonKey(name: 'tcp-concurrent') bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson) Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule, @JsonKey(name: 'global-ua') String? globalUa, @JsonKey(name: 'external-controller') ExternalControllerStatus externalController, Map<String, String> hosts)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _ClashConfig() when $default != null:
|
case _ClashConfig() when $default != null:
|
||||||
return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:
|
return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:
|
||||||
@@ -3730,7 +3730,7 @@ return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'mixed-port') int mixedPort, @JsonKey(name: 'socks-port') int socksPort, @JsonKey(name: 'port') int port, @JsonKey(name: 'redir-port') int redirPort, @JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode, @JsonKey(name: 'allow-lan') bool allowLan, @JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval') int keepAliveInterval, @JsonKey(name: 'unified-delay') bool unifiedDelay, @JsonKey(name: 'tcp-concurrent') bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson) Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule, @JsonKey(name: 'global-ua') String? globalUa, @JsonKey(name: 'external-controller') ExternalControllerStatus externalController, HostsMap hosts) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'mixed-port') int mixedPort, @JsonKey(name: 'socks-port') int socksPort, @JsonKey(name: 'port') int port, @JsonKey(name: 'redir-port') int redirPort, @JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode, @JsonKey(name: 'allow-lan') bool allowLan, @JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval') int keepAliveInterval, @JsonKey(name: 'unified-delay') bool unifiedDelay, @JsonKey(name: 'tcp-concurrent') bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson) Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule, @JsonKey(name: 'global-ua') String? globalUa, @JsonKey(name: 'external-controller') ExternalControllerStatus externalController, Map<String, String> hosts) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _ClashConfig():
|
case _ClashConfig():
|
||||||
return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:
|
return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:
|
||||||
@@ -3750,7 +3750,7 @@ return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'mixed-port') int mixedPort, @JsonKey(name: 'socks-port') int socksPort, @JsonKey(name: 'port') int port, @JsonKey(name: 'redir-port') int redirPort, @JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode, @JsonKey(name: 'allow-lan') bool allowLan, @JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval') int keepAliveInterval, @JsonKey(name: 'unified-delay') bool unifiedDelay, @JsonKey(name: 'tcp-concurrent') bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson) Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule, @JsonKey(name: 'global-ua') String? globalUa, @JsonKey(name: 'external-controller') ExternalControllerStatus externalController, HostsMap hosts)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'mixed-port') int mixedPort, @JsonKey(name: 'socks-port') int socksPort, @JsonKey(name: 'port') int port, @JsonKey(name: 'redir-port') int redirPort, @JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode, @JsonKey(name: 'allow-lan') bool allowLan, @JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval') int keepAliveInterval, @JsonKey(name: 'unified-delay') bool unifiedDelay, @JsonKey(name: 'tcp-concurrent') bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson) Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule, @JsonKey(name: 'global-ua') String? globalUa, @JsonKey(name: 'external-controller') ExternalControllerStatus externalController, Map<String, String> hosts)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _ClashConfig() when $default != null:
|
case _ClashConfig() when $default != null:
|
||||||
return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:
|
return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:
|
||||||
@@ -3765,7 +3765,7 @@ return $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _ClashConfig implements ClashConfig {
|
class _ClashConfig implements ClashConfig {
|
||||||
const _ClashConfig({@JsonKey(name: 'mixed-port') this.mixedPort = defaultMixedPort, @JsonKey(name: 'socks-port') this.socksPort = 0, @JsonKey(name: 'port') this.port = 0, @JsonKey(name: 'redir-port') this.redirPort = 0, @JsonKey(name: 'tproxy-port') this.tproxyPort = 0, this.mode = Mode.rule, @JsonKey(name: 'allow-lan') this.allowLan = false, @JsonKey(name: 'log-level') this.logLevel = LogLevel.error, this.ipv6 = false, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) this.findProcessMode = FindProcessMode.always, @JsonKey(name: 'keep-alive-interval') this.keepAliveInterval = defaultKeepAliveInterval, @JsonKey(name: 'unified-delay') this.unifiedDelay = true, @JsonKey(name: 'tcp-concurrent') this.tcpConcurrent = true, @JsonKey(fromJson: Tun.safeFormJson) this.tun = defaultTun, @JsonKey(fromJson: Dns.safeDnsFromJson) this.dns = defaultDns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) this.geoXUrl = defaultGeoXUrl, @JsonKey(name: 'geodata-loader') this.geodataLoader = GeodataLoader.memconservative, @JsonKey(name: 'proxy-groups') final List<ProxyGroup> proxyGroups = const [], final List<String> rule = const [], @JsonKey(name: 'global-ua') this.globalUa, @JsonKey(name: 'external-controller') this.externalController = ExternalControllerStatus.close, final HostsMap hosts = const {}}): _proxyGroups = proxyGroups,_rule = rule,_hosts = hosts;
|
const _ClashConfig({@JsonKey(name: 'mixed-port') this.mixedPort = defaultMixedPort, @JsonKey(name: 'socks-port') this.socksPort = 0, @JsonKey(name: 'port') this.port = 0, @JsonKey(name: 'redir-port') this.redirPort = 0, @JsonKey(name: 'tproxy-port') this.tproxyPort = 0, this.mode = Mode.rule, @JsonKey(name: 'allow-lan') this.allowLan = false, @JsonKey(name: 'log-level') this.logLevel = LogLevel.error, this.ipv6 = false, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) this.findProcessMode = FindProcessMode.always, @JsonKey(name: 'keep-alive-interval') this.keepAliveInterval = defaultKeepAliveInterval, @JsonKey(name: 'unified-delay') this.unifiedDelay = true, @JsonKey(name: 'tcp-concurrent') this.tcpConcurrent = true, @JsonKey(fromJson: Tun.safeFormJson) this.tun = defaultTun, @JsonKey(fromJson: Dns.safeDnsFromJson) this.dns = defaultDns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) this.geoXUrl = defaultGeoXUrl, @JsonKey(name: 'geodata-loader') this.geodataLoader = GeodataLoader.memconservative, @JsonKey(name: 'proxy-groups') final List<ProxyGroup> proxyGroups = const [], final List<String> rule = const [], @JsonKey(name: 'global-ua') this.globalUa, @JsonKey(name: 'external-controller') this.externalController = ExternalControllerStatus.close, final Map<String, String> hosts = const {}}): _proxyGroups = proxyGroups,_rule = rule,_hosts = hosts;
|
||||||
factory _ClashConfig.fromJson(Map<String, dynamic> json) => _$ClashConfigFromJson(json);
|
factory _ClashConfig.fromJson(Map<String, dynamic> json) => _$ClashConfigFromJson(json);
|
||||||
|
|
||||||
@override@JsonKey(name: 'mixed-port') final int mixedPort;
|
@override@JsonKey(name: 'mixed-port') final int mixedPort;
|
||||||
@@ -3801,8 +3801,8 @@ class _ClashConfig implements ClashConfig {
|
|||||||
|
|
||||||
@override@JsonKey(name: 'global-ua') final String? globalUa;
|
@override@JsonKey(name: 'global-ua') final String? globalUa;
|
||||||
@override@JsonKey(name: 'external-controller') final ExternalControllerStatus externalController;
|
@override@JsonKey(name: 'external-controller') final ExternalControllerStatus externalController;
|
||||||
final HostsMap _hosts;
|
final Map<String, String> _hosts;
|
||||||
@override@JsonKey() HostsMap get hosts {
|
@override@JsonKey() Map<String, String> get hosts {
|
||||||
if (_hosts is EqualUnmodifiableMapView) return _hosts;
|
if (_hosts is EqualUnmodifiableMapView) return _hosts;
|
||||||
// ignore: implicit_dynamic_type
|
// ignore: implicit_dynamic_type
|
||||||
return EqualUnmodifiableMapView(_hosts);
|
return EqualUnmodifiableMapView(_hosts);
|
||||||
@@ -3842,7 +3842,7 @@ abstract mixin class _$ClashConfigCopyWith<$Res> implements $ClashConfigCopyWith
|
|||||||
factory _$ClashConfigCopyWith(_ClashConfig value, $Res Function(_ClashConfig) _then) = __$ClashConfigCopyWithImpl;
|
factory _$ClashConfigCopyWith(_ClashConfig value, $Res Function(_ClashConfig) _then) = __$ClashConfigCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
@JsonKey(name: 'mixed-port') int mixedPort,@JsonKey(name: 'socks-port') int socksPort,@JsonKey(name: 'port') int port,@JsonKey(name: 'redir-port') int redirPort,@JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode,@JsonKey(name: 'allow-lan') bool allowLan,@JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6,@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode,@JsonKey(name: 'keep-alive-interval') int keepAliveInterval,@JsonKey(name: 'unified-delay') bool unifiedDelay,@JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,@JsonKey(fromJson: Tun.safeFormJson) Tun tun,@JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns,@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl,@JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader,@JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule,@JsonKey(name: 'global-ua') String? globalUa,@JsonKey(name: 'external-controller') ExternalControllerStatus externalController, HostsMap hosts
|
@JsonKey(name: 'mixed-port') int mixedPort,@JsonKey(name: 'socks-port') int socksPort,@JsonKey(name: 'port') int port,@JsonKey(name: 'redir-port') int redirPort,@JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode,@JsonKey(name: 'allow-lan') bool allowLan,@JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6,@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode,@JsonKey(name: 'keep-alive-interval') int keepAliveInterval,@JsonKey(name: 'unified-delay') bool unifiedDelay,@JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,@JsonKey(fromJson: Tun.safeFormJson) Tun tun,@JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns,@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl,@JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader,@JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule,@JsonKey(name: 'global-ua') String? globalUa,@JsonKey(name: 'external-controller') ExternalControllerStatus externalController, Map<String, String> hosts
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -3883,7 +3883,7 @@ as List<ProxyGroup>,rule: null == rule ? _self._rule : rule // ignore: cast_null
|
|||||||
as List<String>,globalUa: freezed == globalUa ? _self.globalUa : globalUa // ignore: cast_nullable_to_non_nullable
|
as List<String>,globalUa: freezed == globalUa ? _self.globalUa : globalUa // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,externalController: null == externalController ? _self.externalController : externalController // ignore: cast_nullable_to_non_nullable
|
as String?,externalController: null == externalController ? _self.externalController : externalController // ignore: cast_nullable_to_non_nullable
|
||||||
as ExternalControllerStatus,hosts: null == hosts ? _self._hosts : hosts // ignore: cast_nullable_to_non_nullable
|
as ExternalControllerStatus,hosts: null == hosts ? _self._hosts : hosts // ignore: cast_nullable_to_non_nullable
|
||||||
as HostsMap,
|
as Map<String, String>,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$AppSettingProps {
|
mixin _$AppSettingProps {
|
||||||
|
|
||||||
String? get locale;@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> get dashboardWidgets; bool get onlyStatisticsProxy; bool get autoLaunch; bool get silentLaunch; bool get autoRun; bool get openLogs; bool get closeConnections; String get testUrl; bool get isAnimateToPage; bool get autoCheckUpdate; bool get showLabel; bool get disclaimerAccepted; bool get crashlyticsTip; bool get crashlytics; bool get minimizeOnExit; bool get hidden; bool get developerMode; RecoveryStrategy get recoveryStrategy;
|
String? get locale;@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> get dashboardWidgets; bool get onlyStatisticsProxy; bool get autoLaunch; bool get silentLaunch; bool get autoRun; bool get openLogs; bool get closeConnections; String get testUrl; bool get isAnimateToPage; bool get autoCheckUpdate; bool get showLabel; bool get disclaimerAccepted; bool get crashlyticsTip; bool get crashlytics; bool get minimizeOnExit; bool get hidden; bool get developerMode; RecoveryStrategy get recoveryStrategy; bool get showTrayTitle;
|
||||||
/// Create a copy of AppSettingProps
|
/// Create a copy of AppSettingProps
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $AppSettingPropsCopyWith<AppSettingProps> get copyWith => _$AppSettingPropsCopyW
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppSettingProps&&(identical(other.locale, locale) || other.locale == locale)&&const DeepCollectionEquality().equals(other.dashboardWidgets, dashboardWidgets)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.silentLaunch, silentLaunch) || other.silentLaunch == silentLaunch)&&(identical(other.autoRun, autoRun) || other.autoRun == autoRun)&&(identical(other.openLogs, openLogs) || other.openLogs == openLogs)&&(identical(other.closeConnections, closeConnections) || other.closeConnections == closeConnections)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.isAnimateToPage, isAnimateToPage) || other.isAnimateToPage == isAnimateToPage)&&(identical(other.autoCheckUpdate, autoCheckUpdate) || other.autoCheckUpdate == autoCheckUpdate)&&(identical(other.showLabel, showLabel) || other.showLabel == showLabel)&&(identical(other.disclaimerAccepted, disclaimerAccepted) || other.disclaimerAccepted == disclaimerAccepted)&&(identical(other.crashlyticsTip, crashlyticsTip) || other.crashlyticsTip == crashlyticsTip)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics)&&(identical(other.minimizeOnExit, minimizeOnExit) || other.minimizeOnExit == minimizeOnExit)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.developerMode, developerMode) || other.developerMode == developerMode)&&(identical(other.recoveryStrategy, recoveryStrategy) || other.recoveryStrategy == recoveryStrategy));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppSettingProps&&(identical(other.locale, locale) || other.locale == locale)&&const DeepCollectionEquality().equals(other.dashboardWidgets, dashboardWidgets)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.silentLaunch, silentLaunch) || other.silentLaunch == silentLaunch)&&(identical(other.autoRun, autoRun) || other.autoRun == autoRun)&&(identical(other.openLogs, openLogs) || other.openLogs == openLogs)&&(identical(other.closeConnections, closeConnections) || other.closeConnections == closeConnections)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.isAnimateToPage, isAnimateToPage) || other.isAnimateToPage == isAnimateToPage)&&(identical(other.autoCheckUpdate, autoCheckUpdate) || other.autoCheckUpdate == autoCheckUpdate)&&(identical(other.showLabel, showLabel) || other.showLabel == showLabel)&&(identical(other.disclaimerAccepted, disclaimerAccepted) || other.disclaimerAccepted == disclaimerAccepted)&&(identical(other.crashlyticsTip, crashlyticsTip) || other.crashlyticsTip == crashlyticsTip)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics)&&(identical(other.minimizeOnExit, minimizeOnExit) || other.minimizeOnExit == minimizeOnExit)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.developerMode, developerMode) || other.developerMode == developerMode)&&(identical(other.recoveryStrategy, recoveryStrategy) || other.recoveryStrategy == recoveryStrategy)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([runtimeType,locale,const DeepCollectionEquality().hash(dashboardWidgets),onlyStatisticsProxy,autoLaunch,silentLaunch,autoRun,openLogs,closeConnections,testUrl,isAnimateToPage,autoCheckUpdate,showLabel,disclaimerAccepted,crashlyticsTip,crashlytics,minimizeOnExit,hidden,developerMode,recoveryStrategy]);
|
int get hashCode => Object.hashAll([runtimeType,locale,const DeepCollectionEquality().hash(dashboardWidgets),onlyStatisticsProxy,autoLaunch,silentLaunch,autoRun,openLogs,closeConnections,testUrl,isAnimateToPage,autoCheckUpdate,showLabel,disclaimerAccepted,crashlyticsTip,crashlytics,minimizeOnExit,hidden,developerMode,recoveryStrategy,showTrayTitle]);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AppSettingProps(locale: $locale, dashboardWidgets: $dashboardWidgets, onlyStatisticsProxy: $onlyStatisticsProxy, autoLaunch: $autoLaunch, silentLaunch: $silentLaunch, autoRun: $autoRun, openLogs: $openLogs, closeConnections: $closeConnections, testUrl: $testUrl, isAnimateToPage: $isAnimateToPage, autoCheckUpdate: $autoCheckUpdate, showLabel: $showLabel, disclaimerAccepted: $disclaimerAccepted, crashlyticsTip: $crashlyticsTip, crashlytics: $crashlytics, minimizeOnExit: $minimizeOnExit, hidden: $hidden, developerMode: $developerMode, recoveryStrategy: $recoveryStrategy)';
|
return 'AppSettingProps(locale: $locale, dashboardWidgets: $dashboardWidgets, onlyStatisticsProxy: $onlyStatisticsProxy, autoLaunch: $autoLaunch, silentLaunch: $silentLaunch, autoRun: $autoRun, openLogs: $openLogs, closeConnections: $closeConnections, testUrl: $testUrl, isAnimateToPage: $isAnimateToPage, autoCheckUpdate: $autoCheckUpdate, showLabel: $showLabel, disclaimerAccepted: $disclaimerAccepted, crashlyticsTip: $crashlyticsTip, crashlytics: $crashlytics, minimizeOnExit: $minimizeOnExit, hidden: $hidden, developerMode: $developerMode, recoveryStrategy: $recoveryStrategy, showTrayTitle: $showTrayTitle)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ abstract mixin class $AppSettingPropsCopyWith<$Res> {
|
|||||||
factory $AppSettingPropsCopyWith(AppSettingProps value, $Res Function(AppSettingProps) _then) = _$AppSettingPropsCopyWithImpl;
|
factory $AppSettingPropsCopyWith(AppSettingProps value, $Res Function(AppSettingProps) _then) = _$AppSettingPropsCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String? locale,@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy
|
String? locale,@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy, bool showTrayTitle
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ class _$AppSettingPropsCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of AppSettingProps
|
/// Create a copy of AppSettingProps
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? isAnimateToPage = null,Object? autoCheckUpdate = null,Object? showLabel = null,Object? disclaimerAccepted = null,Object? crashlyticsTip = null,Object? crashlytics = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? recoveryStrategy = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? isAnimateToPage = null,Object? autoCheckUpdate = null,Object? showLabel = null,Object? disclaimerAccepted = null,Object? crashlyticsTip = null,Object? crashlytics = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? recoveryStrategy = null,Object? showTrayTitle = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable
|
locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,dashboardWidgets: null == dashboardWidgets ? _self.dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable
|
as String?,dashboardWidgets: null == dashboardWidgets ? _self.dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -86,7 +86,8 @@ as bool,minimizeOnExit: null == minimizeOnExit ? _self.minimizeOnExit : minimize
|
|||||||
as bool,hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable
|
as bool,hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,developerMode: null == developerMode ? _self.developerMode : developerMode // ignore: cast_nullable_to_non_nullable
|
as bool,developerMode: null == developerMode ? _self.developerMode : developerMode // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,recoveryStrategy: null == recoveryStrategy ? _self.recoveryStrategy : recoveryStrategy // ignore: cast_nullable_to_non_nullable
|
as bool,recoveryStrategy: null == recoveryStrategy ? _self.recoveryStrategy : recoveryStrategy // ignore: cast_nullable_to_non_nullable
|
||||||
as RecoveryStrategy,
|
as RecoveryStrategy,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,10 +172,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy, bool showTrayTitle)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppSettingProps() when $default != null:
|
case _AppSettingProps() when $default != null:
|
||||||
return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.recoveryStrategy);case _:
|
return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.recoveryStrategy,_that.showTrayTitle);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -192,10 +193,10 @@ return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_t
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy, bool showTrayTitle) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppSettingProps():
|
case _AppSettingProps():
|
||||||
return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.recoveryStrategy);case _:
|
return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.recoveryStrategy,_that.showTrayTitle);case _:
|
||||||
throw StateError('Unexpected subclass');
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -212,10 +213,10 @@ return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_t
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy, bool showTrayTitle)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppSettingProps() when $default != null:
|
case _AppSettingProps() when $default != null:
|
||||||
return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.recoveryStrategy);case _:
|
return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.recoveryStrategy,_that.showTrayTitle);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -227,7 +228,7 @@ return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_t
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _AppSettingProps implements AppSettingProps {
|
class _AppSettingProps implements AppSettingProps {
|
||||||
const _AppSettingProps({this.locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) final List<DashboardWidget> dashboardWidgets = defaultDashboardWidgets, this.onlyStatisticsProxy = false, this.autoLaunch = false, this.silentLaunch = false, this.autoRun = false, this.openLogs = false, this.closeConnections = true, this.testUrl = defaultTestUrl, this.isAnimateToPage = true, this.autoCheckUpdate = true, this.showLabel = false, this.disclaimerAccepted = false, this.crashlyticsTip = false, this.crashlytics = false, this.minimizeOnExit = true, this.hidden = false, this.developerMode = false, this.recoveryStrategy = RecoveryStrategy.compatible}): _dashboardWidgets = dashboardWidgets;
|
const _AppSettingProps({this.locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) final List<DashboardWidget> dashboardWidgets = defaultDashboardWidgets, this.onlyStatisticsProxy = false, this.autoLaunch = false, this.silentLaunch = false, this.autoRun = false, this.openLogs = false, this.closeConnections = true, this.testUrl = defaultTestUrl, this.isAnimateToPage = true, this.autoCheckUpdate = true, this.showLabel = false, this.disclaimerAccepted = false, this.crashlyticsTip = false, this.crashlytics = false, this.minimizeOnExit = true, this.hidden = false, this.developerMode = false, this.recoveryStrategy = RecoveryStrategy.compatible, this.showTrayTitle = true}): _dashboardWidgets = dashboardWidgets;
|
||||||
factory _AppSettingProps.fromJson(Map<String, dynamic> json) => _$AppSettingPropsFromJson(json);
|
factory _AppSettingProps.fromJson(Map<String, dynamic> json) => _$AppSettingPropsFromJson(json);
|
||||||
|
|
||||||
@override final String? locale;
|
@override final String? locale;
|
||||||
@@ -255,6 +256,7 @@ class _AppSettingProps implements AppSettingProps {
|
|||||||
@override@JsonKey() final bool hidden;
|
@override@JsonKey() final bool hidden;
|
||||||
@override@JsonKey() final bool developerMode;
|
@override@JsonKey() final bool developerMode;
|
||||||
@override@JsonKey() final RecoveryStrategy recoveryStrategy;
|
@override@JsonKey() final RecoveryStrategy recoveryStrategy;
|
||||||
|
@override@JsonKey() final bool showTrayTitle;
|
||||||
|
|
||||||
/// Create a copy of AppSettingProps
|
/// Create a copy of AppSettingProps
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -269,16 +271,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppSettingProps&&(identical(other.locale, locale) || other.locale == locale)&&const DeepCollectionEquality().equals(other._dashboardWidgets, _dashboardWidgets)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.silentLaunch, silentLaunch) || other.silentLaunch == silentLaunch)&&(identical(other.autoRun, autoRun) || other.autoRun == autoRun)&&(identical(other.openLogs, openLogs) || other.openLogs == openLogs)&&(identical(other.closeConnections, closeConnections) || other.closeConnections == closeConnections)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.isAnimateToPage, isAnimateToPage) || other.isAnimateToPage == isAnimateToPage)&&(identical(other.autoCheckUpdate, autoCheckUpdate) || other.autoCheckUpdate == autoCheckUpdate)&&(identical(other.showLabel, showLabel) || other.showLabel == showLabel)&&(identical(other.disclaimerAccepted, disclaimerAccepted) || other.disclaimerAccepted == disclaimerAccepted)&&(identical(other.crashlyticsTip, crashlyticsTip) || other.crashlyticsTip == crashlyticsTip)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics)&&(identical(other.minimizeOnExit, minimizeOnExit) || other.minimizeOnExit == minimizeOnExit)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.developerMode, developerMode) || other.developerMode == developerMode)&&(identical(other.recoveryStrategy, recoveryStrategy) || other.recoveryStrategy == recoveryStrategy));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppSettingProps&&(identical(other.locale, locale) || other.locale == locale)&&const DeepCollectionEquality().equals(other._dashboardWidgets, _dashboardWidgets)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.silentLaunch, silentLaunch) || other.silentLaunch == silentLaunch)&&(identical(other.autoRun, autoRun) || other.autoRun == autoRun)&&(identical(other.openLogs, openLogs) || other.openLogs == openLogs)&&(identical(other.closeConnections, closeConnections) || other.closeConnections == closeConnections)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.isAnimateToPage, isAnimateToPage) || other.isAnimateToPage == isAnimateToPage)&&(identical(other.autoCheckUpdate, autoCheckUpdate) || other.autoCheckUpdate == autoCheckUpdate)&&(identical(other.showLabel, showLabel) || other.showLabel == showLabel)&&(identical(other.disclaimerAccepted, disclaimerAccepted) || other.disclaimerAccepted == disclaimerAccepted)&&(identical(other.crashlyticsTip, crashlyticsTip) || other.crashlyticsTip == crashlyticsTip)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics)&&(identical(other.minimizeOnExit, minimizeOnExit) || other.minimizeOnExit == minimizeOnExit)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.developerMode, developerMode) || other.developerMode == developerMode)&&(identical(other.recoveryStrategy, recoveryStrategy) || other.recoveryStrategy == recoveryStrategy)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([runtimeType,locale,const DeepCollectionEquality().hash(_dashboardWidgets),onlyStatisticsProxy,autoLaunch,silentLaunch,autoRun,openLogs,closeConnections,testUrl,isAnimateToPage,autoCheckUpdate,showLabel,disclaimerAccepted,crashlyticsTip,crashlytics,minimizeOnExit,hidden,developerMode,recoveryStrategy]);
|
int get hashCode => Object.hashAll([runtimeType,locale,const DeepCollectionEquality().hash(_dashboardWidgets),onlyStatisticsProxy,autoLaunch,silentLaunch,autoRun,openLogs,closeConnections,testUrl,isAnimateToPage,autoCheckUpdate,showLabel,disclaimerAccepted,crashlyticsTip,crashlytics,minimizeOnExit,hidden,developerMode,recoveryStrategy,showTrayTitle]);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AppSettingProps(locale: $locale, dashboardWidgets: $dashboardWidgets, onlyStatisticsProxy: $onlyStatisticsProxy, autoLaunch: $autoLaunch, silentLaunch: $silentLaunch, autoRun: $autoRun, openLogs: $openLogs, closeConnections: $closeConnections, testUrl: $testUrl, isAnimateToPage: $isAnimateToPage, autoCheckUpdate: $autoCheckUpdate, showLabel: $showLabel, disclaimerAccepted: $disclaimerAccepted, crashlyticsTip: $crashlyticsTip, crashlytics: $crashlytics, minimizeOnExit: $minimizeOnExit, hidden: $hidden, developerMode: $developerMode, recoveryStrategy: $recoveryStrategy)';
|
return 'AppSettingProps(locale: $locale, dashboardWidgets: $dashboardWidgets, onlyStatisticsProxy: $onlyStatisticsProxy, autoLaunch: $autoLaunch, silentLaunch: $silentLaunch, autoRun: $autoRun, openLogs: $openLogs, closeConnections: $closeConnections, testUrl: $testUrl, isAnimateToPage: $isAnimateToPage, autoCheckUpdate: $autoCheckUpdate, showLabel: $showLabel, disclaimerAccepted: $disclaimerAccepted, crashlyticsTip: $crashlyticsTip, crashlytics: $crashlytics, minimizeOnExit: $minimizeOnExit, hidden: $hidden, developerMode: $developerMode, recoveryStrategy: $recoveryStrategy, showTrayTitle: $showTrayTitle)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -289,7 +291,7 @@ abstract mixin class _$AppSettingPropsCopyWith<$Res> implements $AppSettingProps
|
|||||||
factory _$AppSettingPropsCopyWith(_AppSettingProps value, $Res Function(_AppSettingProps) _then) = __$AppSettingPropsCopyWithImpl;
|
factory _$AppSettingPropsCopyWith(_AppSettingProps value, $Res Function(_AppSettingProps) _then) = __$AppSettingPropsCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String? locale,@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy
|
String? locale,@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RecoveryStrategy recoveryStrategy, bool showTrayTitle
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -306,7 +308,7 @@ class __$AppSettingPropsCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of AppSettingProps
|
/// Create a copy of AppSettingProps
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? isAnimateToPage = null,Object? autoCheckUpdate = null,Object? showLabel = null,Object? disclaimerAccepted = null,Object? crashlyticsTip = null,Object? crashlytics = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? recoveryStrategy = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? isAnimateToPage = null,Object? autoCheckUpdate = null,Object? showLabel = null,Object? disclaimerAccepted = null,Object? crashlyticsTip = null,Object? crashlytics = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? recoveryStrategy = null,Object? showTrayTitle = null,}) {
|
||||||
return _then(_AppSettingProps(
|
return _then(_AppSettingProps(
|
||||||
locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable
|
locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,dashboardWidgets: null == dashboardWidgets ? _self._dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable
|
as String?,dashboardWidgets: null == dashboardWidgets ? _self._dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -327,7 +329,8 @@ as bool,minimizeOnExit: null == minimizeOnExit ? _self.minimizeOnExit : minimize
|
|||||||
as bool,hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable
|
as bool,hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,developerMode: null == developerMode ? _self.developerMode : developerMode // ignore: cast_nullable_to_non_nullable
|
as bool,developerMode: null == developerMode ? _self.developerMode : developerMode // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,recoveryStrategy: null == recoveryStrategy ? _self.recoveryStrategy : recoveryStrategy // ignore: cast_nullable_to_non_nullable
|
as bool,recoveryStrategy: null == recoveryStrategy ? _self.recoveryStrategy : recoveryStrategy // ignore: cast_nullable_to_non_nullable
|
||||||
as RecoveryStrategy,
|
as RecoveryStrategy,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -828,7 +831,7 @@ return $default(_that.width,_that.height,_that.top,_that.left);case _:
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _WindowProps implements WindowProps {
|
class _WindowProps implements WindowProps {
|
||||||
const _WindowProps({this.width = 750, this.height = 600, this.top, this.left});
|
const _WindowProps({this.width = 0, this.height = 0, this.top, this.left});
|
||||||
factory _WindowProps.fromJson(Map<String, dynamic> json) => _$WindowPropsFromJson(json);
|
factory _WindowProps.fromJson(Map<String, dynamic> json) => _$WindowPropsFromJson(json);
|
||||||
|
|
||||||
@override@JsonKey() final double width;
|
@override@JsonKey() final double width;
|
||||||
@@ -1480,7 +1483,7 @@ as bool,
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$ProxiesStyle {
|
mixin _$ProxiesStyle {
|
||||||
|
|
||||||
ProxiesType get type; ProxiesSortType get sortType; ProxiesLayout get layout; ProxiesIconStyle get iconStyle; ProxyCardType get cardType; Map<String, String> get iconMap;
|
ProxiesType get type; ProxiesSortType get sortType; ProxiesLayout get layout; ProxiesIconStyle get iconStyle; ProxyCardType get cardType;
|
||||||
/// Create a copy of ProxiesStyle
|
/// Create a copy of ProxiesStyle
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -1493,16 +1496,16 @@ $ProxiesStyleCopyWith<ProxiesStyle> get copyWith => _$ProxiesStyleCopyWithImpl<P
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxiesStyle&&(identical(other.type, type) || other.type == type)&&(identical(other.sortType, sortType) || other.sortType == sortType)&&(identical(other.layout, layout) || other.layout == layout)&&(identical(other.iconStyle, iconStyle) || other.iconStyle == iconStyle)&&(identical(other.cardType, cardType) || other.cardType == cardType)&&const DeepCollectionEquality().equals(other.iconMap, iconMap));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxiesStyle&&(identical(other.type, type) || other.type == type)&&(identical(other.sortType, sortType) || other.sortType == sortType)&&(identical(other.layout, layout) || other.layout == layout)&&(identical(other.iconStyle, iconStyle) || other.iconStyle == iconStyle)&&(identical(other.cardType, cardType) || other.cardType == cardType));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,type,sortType,layout,iconStyle,cardType,const DeepCollectionEquality().hash(iconMap));
|
int get hashCode => Object.hash(runtimeType,type,sortType,layout,iconStyle,cardType);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'ProxiesStyle(type: $type, sortType: $sortType, layout: $layout, iconStyle: $iconStyle, cardType: $cardType, iconMap: $iconMap)';
|
return 'ProxiesStyle(type: $type, sortType: $sortType, layout: $layout, iconStyle: $iconStyle, cardType: $cardType)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1513,7 +1516,7 @@ abstract mixin class $ProxiesStyleCopyWith<$Res> {
|
|||||||
factory $ProxiesStyleCopyWith(ProxiesStyle value, $Res Function(ProxiesStyle) _then) = _$ProxiesStyleCopyWithImpl;
|
factory $ProxiesStyleCopyWith(ProxiesStyle value, $Res Function(ProxiesStyle) _then) = _$ProxiesStyleCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType, Map<String, String> iconMap
|
ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1530,15 +1533,14 @@ class _$ProxiesStyleCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of ProxiesStyle
|
/// Create a copy of ProxiesStyle
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? sortType = null,Object? layout = null,Object? iconStyle = null,Object? cardType = null,Object? iconMap = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? sortType = null,Object? layout = null,Object? iconStyle = null,Object? cardType = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesType,sortType: null == sortType ? _self.sortType : sortType // ignore: cast_nullable_to_non_nullable
|
as ProxiesType,sortType: null == sortType ? _self.sortType : sortType // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesSortType,layout: null == layout ? _self.layout : layout // ignore: cast_nullable_to_non_nullable
|
as ProxiesSortType,layout: null == layout ? _self.layout : layout // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesLayout,iconStyle: null == iconStyle ? _self.iconStyle : iconStyle // ignore: cast_nullable_to_non_nullable
|
as ProxiesLayout,iconStyle: null == iconStyle ? _self.iconStyle : iconStyle // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesIconStyle,cardType: null == cardType ? _self.cardType : cardType // ignore: cast_nullable_to_non_nullable
|
as ProxiesIconStyle,cardType: null == cardType ? _self.cardType : cardType // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxyCardType,iconMap: null == iconMap ? _self.iconMap : iconMap // ignore: cast_nullable_to_non_nullable
|
as ProxyCardType,
|
||||||
as Map<String, String>,
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1623,10 +1625,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType, Map<String, String> iconMap)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _ProxiesStyle() when $default != null:
|
case _ProxiesStyle() when $default != null:
|
||||||
return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType,_that.iconMap);case _:
|
return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1644,10 +1646,10 @@ return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.car
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType, Map<String, String> iconMap) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _ProxiesStyle():
|
case _ProxiesStyle():
|
||||||
return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType,_that.iconMap);case _:
|
return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType);case _:
|
||||||
throw StateError('Unexpected subclass');
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1664,10 +1666,10 @@ return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.car
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType, Map<String, String> iconMap)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _ProxiesStyle() when $default != null:
|
case _ProxiesStyle() when $default != null:
|
||||||
return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType,_that.iconMap);case _:
|
return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1679,7 +1681,7 @@ return $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.car
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _ProxiesStyle implements ProxiesStyle {
|
class _ProxiesStyle implements ProxiesStyle {
|
||||||
const _ProxiesStyle({this.type = ProxiesType.tab, this.sortType = ProxiesSortType.none, this.layout = ProxiesLayout.standard, this.iconStyle = ProxiesIconStyle.standard, this.cardType = ProxyCardType.expand, final Map<String, String> iconMap = const {}}): _iconMap = iconMap;
|
const _ProxiesStyle({this.type = ProxiesType.tab, this.sortType = ProxiesSortType.none, this.layout = ProxiesLayout.standard, this.iconStyle = ProxiesIconStyle.standard, this.cardType = ProxyCardType.expand});
|
||||||
factory _ProxiesStyle.fromJson(Map<String, dynamic> json) => _$ProxiesStyleFromJson(json);
|
factory _ProxiesStyle.fromJson(Map<String, dynamic> json) => _$ProxiesStyleFromJson(json);
|
||||||
|
|
||||||
@override@JsonKey() final ProxiesType type;
|
@override@JsonKey() final ProxiesType type;
|
||||||
@@ -1687,13 +1689,6 @@ class _ProxiesStyle implements ProxiesStyle {
|
|||||||
@override@JsonKey() final ProxiesLayout layout;
|
@override@JsonKey() final ProxiesLayout layout;
|
||||||
@override@JsonKey() final ProxiesIconStyle iconStyle;
|
@override@JsonKey() final ProxiesIconStyle iconStyle;
|
||||||
@override@JsonKey() final ProxyCardType cardType;
|
@override@JsonKey() final ProxyCardType cardType;
|
||||||
final Map<String, String> _iconMap;
|
|
||||||
@override@JsonKey() Map<String, String> get iconMap {
|
|
||||||
if (_iconMap is EqualUnmodifiableMapView) return _iconMap;
|
|
||||||
// ignore: implicit_dynamic_type
|
|
||||||
return EqualUnmodifiableMapView(_iconMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Create a copy of ProxiesStyle
|
/// Create a copy of ProxiesStyle
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -1708,16 +1703,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxiesStyle&&(identical(other.type, type) || other.type == type)&&(identical(other.sortType, sortType) || other.sortType == sortType)&&(identical(other.layout, layout) || other.layout == layout)&&(identical(other.iconStyle, iconStyle) || other.iconStyle == iconStyle)&&(identical(other.cardType, cardType) || other.cardType == cardType)&&const DeepCollectionEquality().equals(other._iconMap, _iconMap));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxiesStyle&&(identical(other.type, type) || other.type == type)&&(identical(other.sortType, sortType) || other.sortType == sortType)&&(identical(other.layout, layout) || other.layout == layout)&&(identical(other.iconStyle, iconStyle) || other.iconStyle == iconStyle)&&(identical(other.cardType, cardType) || other.cardType == cardType));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,type,sortType,layout,iconStyle,cardType,const DeepCollectionEquality().hash(_iconMap));
|
int get hashCode => Object.hash(runtimeType,type,sortType,layout,iconStyle,cardType);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'ProxiesStyle(type: $type, sortType: $sortType, layout: $layout, iconStyle: $iconStyle, cardType: $cardType, iconMap: $iconMap)';
|
return 'ProxiesStyle(type: $type, sortType: $sortType, layout: $layout, iconStyle: $iconStyle, cardType: $cardType)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1728,7 +1723,7 @@ abstract mixin class _$ProxiesStyleCopyWith<$Res> implements $ProxiesStyleCopyWi
|
|||||||
factory _$ProxiesStyleCopyWith(_ProxiesStyle value, $Res Function(_ProxiesStyle) _then) = __$ProxiesStyleCopyWithImpl;
|
factory _$ProxiesStyleCopyWith(_ProxiesStyle value, $Res Function(_ProxiesStyle) _then) = __$ProxiesStyleCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType, Map<String, String> iconMap
|
ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1745,15 +1740,14 @@ class __$ProxiesStyleCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of ProxiesStyle
|
/// Create a copy of ProxiesStyle
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? sortType = null,Object? layout = null,Object? iconStyle = null,Object? cardType = null,Object? iconMap = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? sortType = null,Object? layout = null,Object? iconStyle = null,Object? cardType = null,}) {
|
||||||
return _then(_ProxiesStyle(
|
return _then(_ProxiesStyle(
|
||||||
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesType,sortType: null == sortType ? _self.sortType : sortType // ignore: cast_nullable_to_non_nullable
|
as ProxiesType,sortType: null == sortType ? _self.sortType : sortType // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesSortType,layout: null == layout ? _self.layout : layout // ignore: cast_nullable_to_non_nullable
|
as ProxiesSortType,layout: null == layout ? _self.layout : layout // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesLayout,iconStyle: null == iconStyle ? _self.iconStyle : iconStyle // ignore: cast_nullable_to_non_nullable
|
as ProxiesLayout,iconStyle: null == iconStyle ? _self.iconStyle : iconStyle // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesIconStyle,cardType: null == cardType ? _self.cardType : cardType // ignore: cast_nullable_to_non_nullable
|
as ProxiesIconStyle,cardType: null == cardType ? _self.cardType : cardType // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxyCardType,iconMap: null == iconMap ? _self._iconMap : iconMap // ignore: cast_nullable_to_non_nullable
|
as ProxyCardType,
|
||||||
as Map<String, String>,
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2604,7 +2598,7 @@ as List<Script>,
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$Config {
|
mixin _$Config {
|
||||||
|
|
||||||
@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps get appSetting; List<Profile> get profiles; List<HotKeyAction> get hotKeyActions; String? get currentProfileId; bool get overrideDns; DAV? get dav; NetworkProps get networkProps; VpnProps get vpnProps;@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps get themeProps; ProxiesStyle get proxiesStyle; WindowProps get windowProps; ClashConfig get patchClashConfig; ScriptProps get scriptProps;
|
@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps get appSetting; List<Profile> get profiles; List<HotKeyAction> get hotKeyActions; String? get currentProfileId; bool get overrideDns; DAV? get dav; NetworkProps get networkProps; VpnProps get vpnProps;@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps get themeProps; ProxiesStyle get proxiesStyle; WindowProps get windowProps; ClashConfig get patchClashConfig; List<Script> get scripts; List<Rule> get rules;
|
||||||
/// Create a copy of Config
|
/// Create a copy of Config
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -2617,16 +2611,16 @@ $ConfigCopyWith<Config> get copyWith => _$ConfigCopyWithImpl<Config>(this as Con
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Config&&(identical(other.appSetting, appSetting) || other.appSetting == appSetting)&&const DeepCollectionEquality().equals(other.profiles, profiles)&&const DeepCollectionEquality().equals(other.hotKeyActions, hotKeyActions)&&(identical(other.currentProfileId, currentProfileId) || other.currentProfileId == currentProfileId)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.dav, dav) || other.dav == dav)&&(identical(other.networkProps, networkProps) || other.networkProps == networkProps)&&(identical(other.vpnProps, vpnProps) || other.vpnProps == vpnProps)&&(identical(other.themeProps, themeProps) || other.themeProps == themeProps)&&(identical(other.proxiesStyle, proxiesStyle) || other.proxiesStyle == proxiesStyle)&&(identical(other.windowProps, windowProps) || other.windowProps == windowProps)&&(identical(other.patchClashConfig, patchClashConfig) || other.patchClashConfig == patchClashConfig)&&(identical(other.scriptProps, scriptProps) || other.scriptProps == scriptProps));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is Config&&(identical(other.appSetting, appSetting) || other.appSetting == appSetting)&&const DeepCollectionEquality().equals(other.profiles, profiles)&&const DeepCollectionEquality().equals(other.hotKeyActions, hotKeyActions)&&(identical(other.currentProfileId, currentProfileId) || other.currentProfileId == currentProfileId)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.dav, dav) || other.dav == dav)&&(identical(other.networkProps, networkProps) || other.networkProps == networkProps)&&(identical(other.vpnProps, vpnProps) || other.vpnProps == vpnProps)&&(identical(other.themeProps, themeProps) || other.themeProps == themeProps)&&(identical(other.proxiesStyle, proxiesStyle) || other.proxiesStyle == proxiesStyle)&&(identical(other.windowProps, windowProps) || other.windowProps == windowProps)&&(identical(other.patchClashConfig, patchClashConfig) || other.patchClashConfig == patchClashConfig)&&const DeepCollectionEquality().equals(other.scripts, scripts)&&const DeepCollectionEquality().equals(other.rules, rules));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,appSetting,const DeepCollectionEquality().hash(profiles),const DeepCollectionEquality().hash(hotKeyActions),currentProfileId,overrideDns,dav,networkProps,vpnProps,themeProps,proxiesStyle,windowProps,patchClashConfig,scriptProps);
|
int get hashCode => Object.hash(runtimeType,appSetting,const DeepCollectionEquality().hash(profiles),const DeepCollectionEquality().hash(hotKeyActions),currentProfileId,overrideDns,dav,networkProps,vpnProps,themeProps,proxiesStyle,windowProps,patchClashConfig,const DeepCollectionEquality().hash(scripts),const DeepCollectionEquality().hash(rules));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'Config(appSetting: $appSetting, profiles: $profiles, hotKeyActions: $hotKeyActions, currentProfileId: $currentProfileId, overrideDns: $overrideDns, dav: $dav, networkProps: $networkProps, vpnProps: $vpnProps, themeProps: $themeProps, proxiesStyle: $proxiesStyle, windowProps: $windowProps, patchClashConfig: $patchClashConfig, scriptProps: $scriptProps)';
|
return 'Config(appSetting: $appSetting, profiles: $profiles, hotKeyActions: $hotKeyActions, currentProfileId: $currentProfileId, overrideDns: $overrideDns, dav: $dav, networkProps: $networkProps, vpnProps: $vpnProps, themeProps: $themeProps, proxiesStyle: $proxiesStyle, windowProps: $windowProps, patchClashConfig: $patchClashConfig, scripts: $scripts, rules: $rules)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2637,11 +2631,11 @@ abstract mixin class $ConfigCopyWith<$Res> {
|
|||||||
factory $ConfigCopyWith(Config value, $Res Function(Config) _then) = _$ConfigCopyWithImpl;
|
factory $ConfigCopyWith(Config value, $Res Function(Config) _then) = _$ConfigCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps,@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, ScriptProps scriptProps
|
@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps,@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, List<Script> scripts, List<Rule> rules
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$AppSettingPropsCopyWith<$Res> get appSetting;$DAVCopyWith<$Res>? get dav;$NetworkPropsCopyWith<$Res> get networkProps;$VpnPropsCopyWith<$Res> get vpnProps;$ThemePropsCopyWith<$Res> get themeProps;$ProxiesStyleCopyWith<$Res> get proxiesStyle;$WindowPropsCopyWith<$Res> get windowProps;$ClashConfigCopyWith<$Res> get patchClashConfig;$ScriptPropsCopyWith<$Res> get scriptProps;
|
$AppSettingPropsCopyWith<$Res> get appSetting;$DAVCopyWith<$Res>? get dav;$NetworkPropsCopyWith<$Res> get networkProps;$VpnPropsCopyWith<$Res> get vpnProps;$ThemePropsCopyWith<$Res> get themeProps;$ProxiesStyleCopyWith<$Res> get proxiesStyle;$WindowPropsCopyWith<$Res> get windowProps;$ClashConfigCopyWith<$Res> get patchClashConfig;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -2654,7 +2648,7 @@ class _$ConfigCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of Config
|
/// Create a copy of Config
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? appSetting = null,Object? profiles = null,Object? hotKeyActions = null,Object? currentProfileId = freezed,Object? overrideDns = null,Object? dav = freezed,Object? networkProps = null,Object? vpnProps = null,Object? themeProps = null,Object? proxiesStyle = null,Object? windowProps = null,Object? patchClashConfig = null,Object? scriptProps = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? appSetting = null,Object? profiles = null,Object? hotKeyActions = null,Object? currentProfileId = freezed,Object? overrideDns = null,Object? dav = freezed,Object? networkProps = null,Object? vpnProps = null,Object? themeProps = null,Object? proxiesStyle = null,Object? windowProps = null,Object? patchClashConfig = null,Object? scripts = null,Object? rules = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
appSetting: null == appSetting ? _self.appSetting : appSetting // ignore: cast_nullable_to_non_nullable
|
appSetting: null == appSetting ? _self.appSetting : appSetting // ignore: cast_nullable_to_non_nullable
|
||||||
as AppSettingProps,profiles: null == profiles ? _self.profiles : profiles // ignore: cast_nullable_to_non_nullable
|
as AppSettingProps,profiles: null == profiles ? _self.profiles : profiles // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -2668,8 +2662,9 @@ as VpnProps,themeProps: null == themeProps ? _self.themeProps : themeProps // ig
|
|||||||
as ThemeProps,proxiesStyle: null == proxiesStyle ? _self.proxiesStyle : proxiesStyle // ignore: cast_nullable_to_non_nullable
|
as ThemeProps,proxiesStyle: null == proxiesStyle ? _self.proxiesStyle : proxiesStyle // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesStyle,windowProps: null == windowProps ? _self.windowProps : windowProps // ignore: cast_nullable_to_non_nullable
|
as ProxiesStyle,windowProps: null == windowProps ? _self.windowProps : windowProps // ignore: cast_nullable_to_non_nullable
|
||||||
as WindowProps,patchClashConfig: null == patchClashConfig ? _self.patchClashConfig : patchClashConfig // ignore: cast_nullable_to_non_nullable
|
as WindowProps,patchClashConfig: null == patchClashConfig ? _self.patchClashConfig : patchClashConfig // ignore: cast_nullable_to_non_nullable
|
||||||
as ClashConfig,scriptProps: null == scriptProps ? _self.scriptProps : scriptProps // ignore: cast_nullable_to_non_nullable
|
as ClashConfig,scripts: null == scripts ? _self.scripts : scripts // ignore: cast_nullable_to_non_nullable
|
||||||
as ScriptProps,
|
as List<Script>,rules: null == rules ? _self.rules : rules // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<Rule>,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
/// Create a copy of Config
|
/// Create a copy of Config
|
||||||
@@ -2747,15 +2742,6 @@ $ClashConfigCopyWith<$Res> get patchClashConfig {
|
|||||||
return $ClashConfigCopyWith<$Res>(_self.patchClashConfig, (value) {
|
return $ClashConfigCopyWith<$Res>(_self.patchClashConfig, (value) {
|
||||||
return _then(_self.copyWith(patchClashConfig: value));
|
return _then(_self.copyWith(patchClashConfig: value));
|
||||||
});
|
});
|
||||||
}/// Create a copy of Config
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
$ScriptPropsCopyWith<$Res> get scriptProps {
|
|
||||||
|
|
||||||
return $ScriptPropsCopyWith<$Res>(_self.scriptProps, (value) {
|
|
||||||
return _then(_self.copyWith(scriptProps: value));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2838,10 +2824,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, ScriptProps scriptProps)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, List<Script> scripts, List<Rule> rules)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _Config() when $default != null:
|
case _Config() when $default != null:
|
||||||
return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.currentProfileId,_that.overrideDns,_that.dav,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyle,_that.windowProps,_that.patchClashConfig,_that.scriptProps);case _:
|
return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.currentProfileId,_that.overrideDns,_that.dav,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyle,_that.windowProps,_that.patchClashConfig,_that.scripts,_that.rules);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2859,10 +2845,10 @@ return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.curren
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, ScriptProps scriptProps) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, List<Script> scripts, List<Rule> rules) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _Config():
|
case _Config():
|
||||||
return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.currentProfileId,_that.overrideDns,_that.dav,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyle,_that.windowProps,_that.patchClashConfig,_that.scriptProps);case _:
|
return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.currentProfileId,_that.overrideDns,_that.dav,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyle,_that.windowProps,_that.patchClashConfig,_that.scripts,_that.rules);case _:
|
||||||
throw StateError('Unexpected subclass');
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2879,10 +2865,10 @@ return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.curren
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, ScriptProps scriptProps)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, List<Script> scripts, List<Rule> rules)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _Config() when $default != null:
|
case _Config() when $default != null:
|
||||||
return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.currentProfileId,_that.overrideDns,_that.dav,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyle,_that.windowProps,_that.patchClashConfig,_that.scriptProps);case _:
|
return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.currentProfileId,_that.overrideDns,_that.dav,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyle,_that.windowProps,_that.patchClashConfig,_that.scripts,_that.rules);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2894,7 +2880,7 @@ return $default(_that.appSetting,_that.profiles,_that.hotKeyActions,_that.curren
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _Config implements Config {
|
class _Config implements Config {
|
||||||
const _Config({@JsonKey(fromJson: AppSettingProps.safeFromJson) this.appSetting = defaultAppSettingProps, final List<Profile> profiles = const [], final List<HotKeyAction> hotKeyActions = const [], this.currentProfileId, this.overrideDns = false, this.dav, this.networkProps = defaultNetworkProps, this.vpnProps = defaultVpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) required this.themeProps, this.proxiesStyle = defaultProxiesStyle, this.windowProps = defaultWindowProps, this.patchClashConfig = defaultClashConfig, this.scriptProps = const ScriptProps()}): _profiles = profiles,_hotKeyActions = hotKeyActions;
|
const _Config({@JsonKey(fromJson: AppSettingProps.safeFromJson) this.appSetting = defaultAppSettingProps, final List<Profile> profiles = const [], final List<HotKeyAction> hotKeyActions = const [], this.currentProfileId, this.overrideDns = false, this.dav, this.networkProps = defaultNetworkProps, this.vpnProps = defaultVpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) required this.themeProps, this.proxiesStyle = defaultProxiesStyle, this.windowProps = defaultWindowProps, this.patchClashConfig = defaultClashConfig, final List<Script> scripts = const [], final List<Rule> rules = const []}): _profiles = profiles,_hotKeyActions = hotKeyActions,_scripts = scripts,_rules = rules;
|
||||||
factory _Config.fromJson(Map<String, dynamic> json) => _$ConfigFromJson(json);
|
factory _Config.fromJson(Map<String, dynamic> json) => _$ConfigFromJson(json);
|
||||||
|
|
||||||
@override@JsonKey(fromJson: AppSettingProps.safeFromJson) final AppSettingProps appSetting;
|
@override@JsonKey(fromJson: AppSettingProps.safeFromJson) final AppSettingProps appSetting;
|
||||||
@@ -2921,7 +2907,20 @@ class _Config implements Config {
|
|||||||
@override@JsonKey() final ProxiesStyle proxiesStyle;
|
@override@JsonKey() final ProxiesStyle proxiesStyle;
|
||||||
@override@JsonKey() final WindowProps windowProps;
|
@override@JsonKey() final WindowProps windowProps;
|
||||||
@override@JsonKey() final ClashConfig patchClashConfig;
|
@override@JsonKey() final ClashConfig patchClashConfig;
|
||||||
@override@JsonKey() final ScriptProps scriptProps;
|
final List<Script> _scripts;
|
||||||
|
@override@JsonKey() List<Script> get scripts {
|
||||||
|
if (_scripts is EqualUnmodifiableListView) return _scripts;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableListView(_scripts);
|
||||||
|
}
|
||||||
|
|
||||||
|
final List<Rule> _rules;
|
||||||
|
@override@JsonKey() List<Rule> get rules {
|
||||||
|
if (_rules is EqualUnmodifiableListView) return _rules;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableListView(_rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a copy of Config
|
/// Create a copy of Config
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -2936,16 +2935,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Config&&(identical(other.appSetting, appSetting) || other.appSetting == appSetting)&&const DeepCollectionEquality().equals(other._profiles, _profiles)&&const DeepCollectionEquality().equals(other._hotKeyActions, _hotKeyActions)&&(identical(other.currentProfileId, currentProfileId) || other.currentProfileId == currentProfileId)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.dav, dav) || other.dav == dav)&&(identical(other.networkProps, networkProps) || other.networkProps == networkProps)&&(identical(other.vpnProps, vpnProps) || other.vpnProps == vpnProps)&&(identical(other.themeProps, themeProps) || other.themeProps == themeProps)&&(identical(other.proxiesStyle, proxiesStyle) || other.proxiesStyle == proxiesStyle)&&(identical(other.windowProps, windowProps) || other.windowProps == windowProps)&&(identical(other.patchClashConfig, patchClashConfig) || other.patchClashConfig == patchClashConfig)&&(identical(other.scriptProps, scriptProps) || other.scriptProps == scriptProps));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Config&&(identical(other.appSetting, appSetting) || other.appSetting == appSetting)&&const DeepCollectionEquality().equals(other._profiles, _profiles)&&const DeepCollectionEquality().equals(other._hotKeyActions, _hotKeyActions)&&(identical(other.currentProfileId, currentProfileId) || other.currentProfileId == currentProfileId)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.dav, dav) || other.dav == dav)&&(identical(other.networkProps, networkProps) || other.networkProps == networkProps)&&(identical(other.vpnProps, vpnProps) || other.vpnProps == vpnProps)&&(identical(other.themeProps, themeProps) || other.themeProps == themeProps)&&(identical(other.proxiesStyle, proxiesStyle) || other.proxiesStyle == proxiesStyle)&&(identical(other.windowProps, windowProps) || other.windowProps == windowProps)&&(identical(other.patchClashConfig, patchClashConfig) || other.patchClashConfig == patchClashConfig)&&const DeepCollectionEquality().equals(other._scripts, _scripts)&&const DeepCollectionEquality().equals(other._rules, _rules));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,appSetting,const DeepCollectionEquality().hash(_profiles),const DeepCollectionEquality().hash(_hotKeyActions),currentProfileId,overrideDns,dav,networkProps,vpnProps,themeProps,proxiesStyle,windowProps,patchClashConfig,scriptProps);
|
int get hashCode => Object.hash(runtimeType,appSetting,const DeepCollectionEquality().hash(_profiles),const DeepCollectionEquality().hash(_hotKeyActions),currentProfileId,overrideDns,dav,networkProps,vpnProps,themeProps,proxiesStyle,windowProps,patchClashConfig,const DeepCollectionEquality().hash(_scripts),const DeepCollectionEquality().hash(_rules));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'Config(appSetting: $appSetting, profiles: $profiles, hotKeyActions: $hotKeyActions, currentProfileId: $currentProfileId, overrideDns: $overrideDns, dav: $dav, networkProps: $networkProps, vpnProps: $vpnProps, themeProps: $themeProps, proxiesStyle: $proxiesStyle, windowProps: $windowProps, patchClashConfig: $patchClashConfig, scriptProps: $scriptProps)';
|
return 'Config(appSetting: $appSetting, profiles: $profiles, hotKeyActions: $hotKeyActions, currentProfileId: $currentProfileId, overrideDns: $overrideDns, dav: $dav, networkProps: $networkProps, vpnProps: $vpnProps, themeProps: $themeProps, proxiesStyle: $proxiesStyle, windowProps: $windowProps, patchClashConfig: $patchClashConfig, scripts: $scripts, rules: $rules)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2956,11 +2955,11 @@ abstract mixin class _$ConfigCopyWith<$Res> implements $ConfigCopyWith<$Res> {
|
|||||||
factory _$ConfigCopyWith(_Config value, $Res Function(_Config) _then) = __$ConfigCopyWithImpl;
|
factory _$ConfigCopyWith(_Config value, $Res Function(_Config) _then) = __$ConfigCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps,@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, ScriptProps scriptProps
|
@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSetting, List<Profile> profiles, List<HotKeyAction> hotKeyActions, String? currentProfileId, bool overrideDns, DAV? dav, NetworkProps networkProps, VpnProps vpnProps,@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyle proxiesStyle, WindowProps windowProps, ClashConfig patchClashConfig, List<Script> scripts, List<Rule> rules
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@override $AppSettingPropsCopyWith<$Res> get appSetting;@override $DAVCopyWith<$Res>? get dav;@override $NetworkPropsCopyWith<$Res> get networkProps;@override $VpnPropsCopyWith<$Res> get vpnProps;@override $ThemePropsCopyWith<$Res> get themeProps;@override $ProxiesStyleCopyWith<$Res> get proxiesStyle;@override $WindowPropsCopyWith<$Res> get windowProps;@override $ClashConfigCopyWith<$Res> get patchClashConfig;@override $ScriptPropsCopyWith<$Res> get scriptProps;
|
@override $AppSettingPropsCopyWith<$Res> get appSetting;@override $DAVCopyWith<$Res>? get dav;@override $NetworkPropsCopyWith<$Res> get networkProps;@override $VpnPropsCopyWith<$Res> get vpnProps;@override $ThemePropsCopyWith<$Res> get themeProps;@override $ProxiesStyleCopyWith<$Res> get proxiesStyle;@override $WindowPropsCopyWith<$Res> get windowProps;@override $ClashConfigCopyWith<$Res> get patchClashConfig;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -2973,7 +2972,7 @@ class __$ConfigCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of Config
|
/// Create a copy of Config
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? appSetting = null,Object? profiles = null,Object? hotKeyActions = null,Object? currentProfileId = freezed,Object? overrideDns = null,Object? dav = freezed,Object? networkProps = null,Object? vpnProps = null,Object? themeProps = null,Object? proxiesStyle = null,Object? windowProps = null,Object? patchClashConfig = null,Object? scriptProps = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? appSetting = null,Object? profiles = null,Object? hotKeyActions = null,Object? currentProfileId = freezed,Object? overrideDns = null,Object? dav = freezed,Object? networkProps = null,Object? vpnProps = null,Object? themeProps = null,Object? proxiesStyle = null,Object? windowProps = null,Object? patchClashConfig = null,Object? scripts = null,Object? rules = null,}) {
|
||||||
return _then(_Config(
|
return _then(_Config(
|
||||||
appSetting: null == appSetting ? _self.appSetting : appSetting // ignore: cast_nullable_to_non_nullable
|
appSetting: null == appSetting ? _self.appSetting : appSetting // ignore: cast_nullable_to_non_nullable
|
||||||
as AppSettingProps,profiles: null == profiles ? _self._profiles : profiles // ignore: cast_nullable_to_non_nullable
|
as AppSettingProps,profiles: null == profiles ? _self._profiles : profiles // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -2987,8 +2986,9 @@ as VpnProps,themeProps: null == themeProps ? _self.themeProps : themeProps // ig
|
|||||||
as ThemeProps,proxiesStyle: null == proxiesStyle ? _self.proxiesStyle : proxiesStyle // ignore: cast_nullable_to_non_nullable
|
as ThemeProps,proxiesStyle: null == proxiesStyle ? _self.proxiesStyle : proxiesStyle // ignore: cast_nullable_to_non_nullable
|
||||||
as ProxiesStyle,windowProps: null == windowProps ? _self.windowProps : windowProps // ignore: cast_nullable_to_non_nullable
|
as ProxiesStyle,windowProps: null == windowProps ? _self.windowProps : windowProps // ignore: cast_nullable_to_non_nullable
|
||||||
as WindowProps,patchClashConfig: null == patchClashConfig ? _self.patchClashConfig : patchClashConfig // ignore: cast_nullable_to_non_nullable
|
as WindowProps,patchClashConfig: null == patchClashConfig ? _self.patchClashConfig : patchClashConfig // ignore: cast_nullable_to_non_nullable
|
||||||
as ClashConfig,scriptProps: null == scriptProps ? _self.scriptProps : scriptProps // ignore: cast_nullable_to_non_nullable
|
as ClashConfig,scripts: null == scripts ? _self._scripts : scripts // ignore: cast_nullable_to_non_nullable
|
||||||
as ScriptProps,
|
as List<Script>,rules: null == rules ? _self._rules : rules // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<Rule>,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3067,15 +3067,6 @@ $ClashConfigCopyWith<$Res> get patchClashConfig {
|
|||||||
return $ClashConfigCopyWith<$Res>(_self.patchClashConfig, (value) {
|
return $ClashConfigCopyWith<$Res>(_self.patchClashConfig, (value) {
|
||||||
return _then(_self.copyWith(patchClashConfig: value));
|
return _then(_self.copyWith(patchClashConfig: value));
|
||||||
});
|
});
|
||||||
}/// Create a copy of Config
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
$ScriptPropsCopyWith<$Res> get scriptProps {
|
|
||||||
|
|
||||||
return $ScriptPropsCopyWith<$Res>(_self.scriptProps, (value) {
|
|
||||||
return _then(_self.copyWith(scriptProps: value));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ _AppSettingProps _$AppSettingPropsFromJson(Map<String, dynamic> json) =>
|
|||||||
json['recoveryStrategy'],
|
json['recoveryStrategy'],
|
||||||
) ??
|
) ??
|
||||||
RecoveryStrategy.compatible,
|
RecoveryStrategy.compatible,
|
||||||
|
showTrayTitle: json['showTrayTitle'] as bool? ?? true,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$AppSettingPropsToJson(_AppSettingProps instance) =>
|
Map<String, dynamic> _$AppSettingPropsToJson(_AppSettingProps instance) =>
|
||||||
@@ -59,6 +60,7 @@ Map<String, dynamic> _$AppSettingPropsToJson(_AppSettingProps instance) =>
|
|||||||
'hidden': instance.hidden,
|
'hidden': instance.hidden,
|
||||||
'developerMode': instance.developerMode,
|
'developerMode': instance.developerMode,
|
||||||
'recoveryStrategy': _$RecoveryStrategyEnumMap[instance.recoveryStrategy]!,
|
'recoveryStrategy': _$RecoveryStrategyEnumMap[instance.recoveryStrategy]!,
|
||||||
|
'showTrayTitle': instance.showTrayTitle,
|
||||||
};
|
};
|
||||||
|
|
||||||
const _$RecoveryStrategyEnumMap = {
|
const _$RecoveryStrategyEnumMap = {
|
||||||
@@ -125,8 +127,8 @@ const _$AccessSortTypeEnumMap = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_WindowProps _$WindowPropsFromJson(Map<String, dynamic> json) => _WindowProps(
|
_WindowProps _$WindowPropsFromJson(Map<String, dynamic> json) => _WindowProps(
|
||||||
width: (json['width'] as num?)?.toDouble() ?? 750,
|
width: (json['width'] as num?)?.toDouble() ?? 0,
|
||||||
height: (json['height'] as num?)?.toDouble() ?? 600,
|
height: (json['height'] as num?)?.toDouble() ?? 0,
|
||||||
top: (json['top'] as num?)?.toDouble(),
|
top: (json['top'] as num?)?.toDouble(),
|
||||||
left: (json['left'] as num?)?.toDouble(),
|
left: (json['left'] as num?)?.toDouble(),
|
||||||
);
|
);
|
||||||
@@ -205,11 +207,6 @@ _ProxiesStyle _$ProxiesStyleFromJson(Map<String, dynamic> json) =>
|
|||||||
cardType:
|
cardType:
|
||||||
$enumDecodeNullable(_$ProxyCardTypeEnumMap, json['cardType']) ??
|
$enumDecodeNullable(_$ProxyCardTypeEnumMap, json['cardType']) ??
|
||||||
ProxyCardType.expand,
|
ProxyCardType.expand,
|
||||||
iconMap:
|
|
||||||
(json['iconMap'] as Map<String, dynamic>?)?.map(
|
|
||||||
(k, e) => MapEntry(k, e as String),
|
|
||||||
) ??
|
|
||||||
const {},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$ProxiesStyleToJson(_ProxiesStyle instance) =>
|
Map<String, dynamic> _$ProxiesStyleToJson(_ProxiesStyle instance) =>
|
||||||
@@ -219,7 +216,6 @@ Map<String, dynamic> _$ProxiesStyleToJson(_ProxiesStyle instance) =>
|
|||||||
'layout': _$ProxiesLayoutEnumMap[instance.layout]!,
|
'layout': _$ProxiesLayoutEnumMap[instance.layout]!,
|
||||||
'iconStyle': _$ProxiesIconStyleEnumMap[instance.iconStyle]!,
|
'iconStyle': _$ProxiesIconStyleEnumMap[instance.iconStyle]!,
|
||||||
'cardType': _$ProxyCardTypeEnumMap[instance.cardType]!,
|
'cardType': _$ProxyCardTypeEnumMap[instance.cardType]!,
|
||||||
'iconMap': instance.iconMap,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const _$ProxiesTypeEnumMap = {ProxiesType.tab: 'tab', ProxiesType.list: 'list'};
|
const _$ProxiesTypeEnumMap = {ProxiesType.tab: 'tab', ProxiesType.list: 'list'};
|
||||||
@@ -237,8 +233,8 @@ const _$ProxiesLayoutEnumMap = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const _$ProxiesIconStyleEnumMap = {
|
const _$ProxiesIconStyleEnumMap = {
|
||||||
ProxiesIconStyle.standard: 'standard',
|
|
||||||
ProxiesIconStyle.none: 'none',
|
ProxiesIconStyle.none: 'none',
|
||||||
|
ProxiesIconStyle.standard: 'standard',
|
||||||
ProxiesIconStyle.icon: 'icon',
|
ProxiesIconStyle.icon: 'icon',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -360,9 +356,16 @@ _Config _$ConfigFromJson(Map<String, dynamic> json) => _Config(
|
|||||||
patchClashConfig: json['patchClashConfig'] == null
|
patchClashConfig: json['patchClashConfig'] == null
|
||||||
? defaultClashConfig
|
? defaultClashConfig
|
||||||
: ClashConfig.fromJson(json['patchClashConfig'] as Map<String, dynamic>),
|
: ClashConfig.fromJson(json['patchClashConfig'] as Map<String, dynamic>),
|
||||||
scriptProps: json['scriptProps'] == null
|
scripts:
|
||||||
? const ScriptProps()
|
(json['scripts'] as List<dynamic>?)
|
||||||
: ScriptProps.fromJson(json['scriptProps'] as Map<String, dynamic>),
|
?.map((e) => Script.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList() ??
|
||||||
|
const [],
|
||||||
|
rules:
|
||||||
|
(json['rules'] as List<dynamic>?)
|
||||||
|
?.map((e) => Rule.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList() ??
|
||||||
|
const [],
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$ConfigToJson(_Config instance) => <String, dynamic>{
|
Map<String, dynamic> _$ConfigToJson(_Config instance) => <String, dynamic>{
|
||||||
@@ -378,5 +381,6 @@ Map<String, dynamic> _$ConfigToJson(_Config instance) => <String, dynamic>{
|
|||||||
'proxiesStyle': instance.proxiesStyle,
|
'proxiesStyle': instance.proxiesStyle,
|
||||||
'windowProps': instance.windowProps,
|
'windowProps': instance.windowProps,
|
||||||
'patchClashConfig': instance.patchClashConfig,
|
'patchClashConfig': instance.patchClashConfig,
|
||||||
'scriptProps': instance.scriptProps,
|
'scripts': instance.scripts,
|
||||||
|
'rules': instance.rules,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ _Profile _$ProfileFromJson(Map<String, dynamic> json) => _Profile(
|
|||||||
overrideData: json['overrideData'] == null
|
overrideData: json['overrideData'] == null
|
||||||
? const OverrideData()
|
? const OverrideData()
|
||||||
: OverrideData.fromJson(json['overrideData'] as Map<String, dynamic>),
|
: OverrideData.fromJson(json['overrideData'] as Map<String, dynamic>),
|
||||||
|
overwrite: json['overwrite'] == null
|
||||||
|
? const Overwrite()
|
||||||
|
: Overwrite.fromJson(json['overwrite'] as Map<String, dynamic>),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$ProfileToJson(_Profile instance) => <String, dynamic>{
|
Map<String, dynamic> _$ProfileToJson(_Profile instance) => <String, dynamic>{
|
||||||
@@ -64,8 +67,63 @@ Map<String, dynamic> _$ProfileToJson(_Profile instance) => <String, dynamic>{
|
|||||||
'selectedMap': instance.selectedMap,
|
'selectedMap': instance.selectedMap,
|
||||||
'unfoldSet': instance.unfoldSet.toList(),
|
'unfoldSet': instance.unfoldSet.toList(),
|
||||||
'overrideData': instance.overrideData,
|
'overrideData': instance.overrideData,
|
||||||
|
'overwrite': instance.overwrite,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_Overwrite _$OverwriteFromJson(Map<String, dynamic> json) => _Overwrite(
|
||||||
|
type:
|
||||||
|
$enumDecodeNullable(_$OverwriteTypeEnumMap, json['type']) ??
|
||||||
|
OverwriteType.standard,
|
||||||
|
standardOverwrite: json['standardOverwrite'] == null
|
||||||
|
? const StandardOverwrite()
|
||||||
|
: StandardOverwrite.fromJson(
|
||||||
|
json['standardOverwrite'] as Map<String, dynamic>,
|
||||||
|
),
|
||||||
|
scriptOverwrite: json['scriptOverwrite'] == null
|
||||||
|
? const ScriptOverwrite()
|
||||||
|
: ScriptOverwrite.fromJson(
|
||||||
|
json['scriptOverwrite'] as Map<String, dynamic>,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$OverwriteToJson(_Overwrite instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'type': _$OverwriteTypeEnumMap[instance.type]!,
|
||||||
|
'standardOverwrite': instance.standardOverwrite,
|
||||||
|
'scriptOverwrite': instance.scriptOverwrite,
|
||||||
|
};
|
||||||
|
|
||||||
|
const _$OverwriteTypeEnumMap = {
|
||||||
|
OverwriteType.standard: 'standard',
|
||||||
|
OverwriteType.script: 'script',
|
||||||
|
};
|
||||||
|
|
||||||
|
_StandardOverwrite _$StandardOverwriteFromJson(Map<String, dynamic> json) =>
|
||||||
|
_StandardOverwrite(
|
||||||
|
addedRules:
|
||||||
|
(json['addedRules'] as List<dynamic>?)
|
||||||
|
?.map((e) => Rule.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList() ??
|
||||||
|
const [],
|
||||||
|
disabledRuleIds:
|
||||||
|
(json['disabledRuleIds'] as List<dynamic>?)
|
||||||
|
?.map((e) => e as String)
|
||||||
|
.toList() ??
|
||||||
|
const [],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$StandardOverwriteToJson(_StandardOverwrite instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'addedRules': instance.addedRules,
|
||||||
|
'disabledRuleIds': instance.disabledRuleIds,
|
||||||
|
};
|
||||||
|
|
||||||
|
_ScriptOverwrite _$ScriptOverwriteFromJson(Map<String, dynamic> json) =>
|
||||||
|
_ScriptOverwrite(scriptId: json['scriptId'] as String?);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$ScriptOverwriteToJson(_ScriptOverwrite instance) =>
|
||||||
|
<String, dynamic>{'scriptId': instance.scriptId};
|
||||||
|
|
||||||
_OverrideData _$OverrideDataFromJson(Map<String, dynamic> json) =>
|
_OverrideData _$OverrideDataFromJson(Map<String, dynamic> json) =>
|
||||||
_OverrideData(
|
_OverrideData(
|
||||||
enable: json['enable'] as bool? ?? false,
|
enable: json['enable'] as bool? ?? false,
|
||||||
|
|||||||
@@ -1885,7 +1885,7 @@ $IpInfoCopyWith<$Res>? get ipInfo {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$TrayState {
|
mixin _$TrayState {
|
||||||
|
|
||||||
Mode get mode; int get port; bool get autoLaunch; bool get systemProxy; bool get tunEnable; bool get isStart; String? get locale; Brightness? get brightness; List<Group> get groups; SelectedMap get selectedMap;
|
Mode get mode; int get port; bool get autoLaunch; bool get systemProxy; bool get tunEnable; bool get isStart; String? get locale; Brightness? get brightness; List<Group> get groups; Map<String, String> get selectedMap; bool get showTrayTitle;
|
||||||
/// Create a copy of TrayState
|
/// Create a copy of TrayState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -1896,16 +1896,16 @@ $TrayStateCopyWith<TrayState> get copyWith => _$TrayStateCopyWithImpl<TrayState>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TrayState&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.port, port) || other.port == port)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&(identical(other.tunEnable, tunEnable) || other.tunEnable == tunEnable)&&(identical(other.isStart, isStart) || other.isStart == isStart)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&const DeepCollectionEquality().equals(other.groups, groups)&&const DeepCollectionEquality().equals(other.selectedMap, selectedMap));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TrayState&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.port, port) || other.port == port)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&(identical(other.tunEnable, tunEnable) || other.tunEnable == tunEnable)&&(identical(other.isStart, isStart) || other.isStart == isStart)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&const DeepCollectionEquality().equals(other.groups, groups)&&const DeepCollectionEquality().equals(other.selectedMap, selectedMap)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,mode,port,autoLaunch,systemProxy,tunEnable,isStart,locale,brightness,const DeepCollectionEquality().hash(groups),const DeepCollectionEquality().hash(selectedMap));
|
int get hashCode => Object.hash(runtimeType,mode,port,autoLaunch,systemProxy,tunEnable,isStart,locale,brightness,const DeepCollectionEquality().hash(groups),const DeepCollectionEquality().hash(selectedMap),showTrayTitle);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'TrayState(mode: $mode, port: $port, autoLaunch: $autoLaunch, systemProxy: $systemProxy, tunEnable: $tunEnable, isStart: $isStart, locale: $locale, brightness: $brightness, groups: $groups, selectedMap: $selectedMap)';
|
return 'TrayState(mode: $mode, port: $port, autoLaunch: $autoLaunch, systemProxy: $systemProxy, tunEnable: $tunEnable, isStart: $isStart, locale: $locale, brightness: $brightness, groups: $groups, selectedMap: $selectedMap, showTrayTitle: $showTrayTitle)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1916,7 +1916,7 @@ abstract mixin class $TrayStateCopyWith<$Res> {
|
|||||||
factory $TrayStateCopyWith(TrayState value, $Res Function(TrayState) _then) = _$TrayStateCopyWithImpl;
|
factory $TrayStateCopyWith(TrayState value, $Res Function(TrayState) _then) = _$TrayStateCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, SelectedMap selectedMap
|
Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, Map<String, String> selectedMap, bool showTrayTitle
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1933,7 +1933,7 @@ class _$TrayStateCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of TrayState
|
/// Create a copy of TrayState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? mode = null,Object? port = null,Object? autoLaunch = null,Object? systemProxy = null,Object? tunEnable = null,Object? isStart = null,Object? locale = freezed,Object? brightness = freezed,Object? groups = null,Object? selectedMap = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? mode = null,Object? port = null,Object? autoLaunch = null,Object? systemProxy = null,Object? tunEnable = null,Object? isStart = null,Object? locale = freezed,Object? brightness = freezed,Object? groups = null,Object? selectedMap = null,Object? showTrayTitle = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable
|
mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable
|
||||||
as Mode,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable
|
as Mode,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -1945,7 +1945,8 @@ as bool,locale: freezed == locale ? _self.locale : locale // ignore: cast_nullab
|
|||||||
as String?,brightness: freezed == brightness ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable
|
as String?,brightness: freezed == brightness ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable
|
||||||
as Brightness?,groups: null == groups ? _self.groups : groups // ignore: cast_nullable_to_non_nullable
|
as Brightness?,groups: null == groups ? _self.groups : groups // ignore: cast_nullable_to_non_nullable
|
||||||
as List<Group>,selectedMap: null == selectedMap ? _self.selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable
|
as List<Group>,selectedMap: null == selectedMap ? _self.selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable
|
||||||
as SelectedMap,
|
as Map<String, String>,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2030,10 +2031,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, SelectedMap selectedMap)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, Map<String, String> selectedMap, bool showTrayTitle)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TrayState() when $default != null:
|
case _TrayState() when $default != null:
|
||||||
return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap);case _:
|
return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap,_that.showTrayTitle);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2051,10 +2052,10 @@ return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.t
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, SelectedMap selectedMap) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, Map<String, String> selectedMap, bool showTrayTitle) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TrayState():
|
case _TrayState():
|
||||||
return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap);case _:
|
return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap,_that.showTrayTitle);case _:
|
||||||
throw StateError('Unexpected subclass');
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2071,10 +2072,10 @@ return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.t
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, SelectedMap selectedMap)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, Map<String, String> selectedMap, bool showTrayTitle)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TrayState() when $default != null:
|
case _TrayState() when $default != null:
|
||||||
return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap);case _:
|
return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap,_that.showTrayTitle);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2086,7 +2087,7 @@ return $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.t
|
|||||||
|
|
||||||
|
|
||||||
class _TrayState implements TrayState {
|
class _TrayState implements TrayState {
|
||||||
const _TrayState({required this.mode, required this.port, required this.autoLaunch, required this.systemProxy, required this.tunEnable, required this.isStart, required this.locale, required this.brightness, required final List<Group> groups, required final SelectedMap selectedMap}): _groups = groups,_selectedMap = selectedMap;
|
const _TrayState({required this.mode, required this.port, required this.autoLaunch, required this.systemProxy, required this.tunEnable, required this.isStart, required this.locale, required this.brightness, required final List<Group> groups, required final Map<String, String> selectedMap, required this.showTrayTitle}): _groups = groups,_selectedMap = selectedMap;
|
||||||
|
|
||||||
|
|
||||||
@override final Mode mode;
|
@override final Mode mode;
|
||||||
@@ -2104,13 +2105,14 @@ class _TrayState implements TrayState {
|
|||||||
return EqualUnmodifiableListView(_groups);
|
return EqualUnmodifiableListView(_groups);
|
||||||
}
|
}
|
||||||
|
|
||||||
final SelectedMap _selectedMap;
|
final Map<String, String> _selectedMap;
|
||||||
@override SelectedMap get selectedMap {
|
@override Map<String, String> get selectedMap {
|
||||||
if (_selectedMap is EqualUnmodifiableMapView) return _selectedMap;
|
if (_selectedMap is EqualUnmodifiableMapView) return _selectedMap;
|
||||||
// ignore: implicit_dynamic_type
|
// ignore: implicit_dynamic_type
|
||||||
return EqualUnmodifiableMapView(_selectedMap);
|
return EqualUnmodifiableMapView(_selectedMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override final bool showTrayTitle;
|
||||||
|
|
||||||
/// Create a copy of TrayState
|
/// Create a copy of TrayState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -2122,16 +2124,16 @@ _$TrayStateCopyWith<_TrayState> get copyWith => __$TrayStateCopyWithImpl<_TraySt
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TrayState&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.port, port) || other.port == port)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&(identical(other.tunEnable, tunEnable) || other.tunEnable == tunEnable)&&(identical(other.isStart, isStart) || other.isStart == isStart)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&const DeepCollectionEquality().equals(other._groups, _groups)&&const DeepCollectionEquality().equals(other._selectedMap, _selectedMap));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TrayState&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.port, port) || other.port == port)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&(identical(other.tunEnable, tunEnable) || other.tunEnable == tunEnable)&&(identical(other.isStart, isStart) || other.isStart == isStart)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&const DeepCollectionEquality().equals(other._groups, _groups)&&const DeepCollectionEquality().equals(other._selectedMap, _selectedMap)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,mode,port,autoLaunch,systemProxy,tunEnable,isStart,locale,brightness,const DeepCollectionEquality().hash(_groups),const DeepCollectionEquality().hash(_selectedMap));
|
int get hashCode => Object.hash(runtimeType,mode,port,autoLaunch,systemProxy,tunEnable,isStart,locale,brightness,const DeepCollectionEquality().hash(_groups),const DeepCollectionEquality().hash(_selectedMap),showTrayTitle);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'TrayState(mode: $mode, port: $port, autoLaunch: $autoLaunch, systemProxy: $systemProxy, tunEnable: $tunEnable, isStart: $isStart, locale: $locale, brightness: $brightness, groups: $groups, selectedMap: $selectedMap)';
|
return 'TrayState(mode: $mode, port: $port, autoLaunch: $autoLaunch, systemProxy: $systemProxy, tunEnable: $tunEnable, isStart: $isStart, locale: $locale, brightness: $brightness, groups: $groups, selectedMap: $selectedMap, showTrayTitle: $showTrayTitle)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2142,7 +2144,7 @@ abstract mixin class _$TrayStateCopyWith<$Res> implements $TrayStateCopyWith<$Re
|
|||||||
factory _$TrayStateCopyWith(_TrayState value, $Res Function(_TrayState) _then) = __$TrayStateCopyWithImpl;
|
factory _$TrayStateCopyWith(_TrayState value, $Res Function(_TrayState) _then) = __$TrayStateCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, SelectedMap selectedMap
|
Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, Map<String, String> selectedMap, bool showTrayTitle
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -2159,7 +2161,7 @@ class __$TrayStateCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of TrayState
|
/// Create a copy of TrayState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? mode = null,Object? port = null,Object? autoLaunch = null,Object? systemProxy = null,Object? tunEnable = null,Object? isStart = null,Object? locale = freezed,Object? brightness = freezed,Object? groups = null,Object? selectedMap = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? mode = null,Object? port = null,Object? autoLaunch = null,Object? systemProxy = null,Object? tunEnable = null,Object? isStart = null,Object? locale = freezed,Object? brightness = freezed,Object? groups = null,Object? selectedMap = null,Object? showTrayTitle = null,}) {
|
||||||
return _then(_TrayState(
|
return _then(_TrayState(
|
||||||
mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable
|
mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable
|
||||||
as Mode,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable
|
as Mode,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -2171,13 +2173,292 @@ as bool,locale: freezed == locale ? _self.locale : locale // ignore: cast_nullab
|
|||||||
as String?,brightness: freezed == brightness ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable
|
as String?,brightness: freezed == brightness ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable
|
||||||
as Brightness?,groups: null == groups ? _self._groups : groups // ignore: cast_nullable_to_non_nullable
|
as Brightness?,groups: null == groups ? _self._groups : groups // ignore: cast_nullable_to_non_nullable
|
||||||
as List<Group>,selectedMap: null == selectedMap ? _self._selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable
|
as List<Group>,selectedMap: null == selectedMap ? _self._selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable
|
||||||
as SelectedMap,
|
as Map<String, String>,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$TrayTitleState {
|
||||||
|
|
||||||
|
Traffic get traffic; bool get showTrayTitle;
|
||||||
|
/// Create a copy of TrayTitleState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$TrayTitleStateCopyWith<TrayTitleState> get copyWith => _$TrayTitleStateCopyWithImpl<TrayTitleState>(this as TrayTitleState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TrayTitleState&&(identical(other.traffic, traffic) || other.traffic == traffic)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,traffic,showTrayTitle);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'TrayTitleState(traffic: $traffic, showTrayTitle: $showTrayTitle)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $TrayTitleStateCopyWith<$Res> {
|
||||||
|
factory $TrayTitleStateCopyWith(TrayTitleState value, $Res Function(TrayTitleState) _then) = _$TrayTitleStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
Traffic traffic, bool showTrayTitle
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$TrafficCopyWith<$Res> get traffic;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$TrayTitleStateCopyWithImpl<$Res>
|
||||||
|
implements $TrayTitleStateCopyWith<$Res> {
|
||||||
|
_$TrayTitleStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final TrayTitleState _self;
|
||||||
|
final $Res Function(TrayTitleState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of TrayTitleState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? traffic = null,Object? showTrayTitle = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
traffic: null == traffic ? _self.traffic : traffic // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Traffic,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
/// Create a copy of TrayTitleState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$TrafficCopyWith<$Res> get traffic {
|
||||||
|
|
||||||
|
return $TrafficCopyWith<$Res>(_self.traffic, (value) {
|
||||||
|
return _then(_self.copyWith(traffic: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [TrayTitleState].
|
||||||
|
extension TrayTitleStatePatterns on TrayTitleState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TrayTitleState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _TrayTitleState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TrayTitleState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _TrayTitleState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TrayTitleState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _TrayTitleState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Traffic traffic, bool showTrayTitle)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _TrayTitleState() when $default != null:
|
||||||
|
return $default(_that.traffic,_that.showTrayTitle);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Traffic traffic, bool showTrayTitle) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _TrayTitleState():
|
||||||
|
return $default(_that.traffic,_that.showTrayTitle);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Traffic traffic, bool showTrayTitle)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _TrayTitleState() when $default != null:
|
||||||
|
return $default(_that.traffic,_that.showTrayTitle);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _TrayTitleState implements TrayTitleState {
|
||||||
|
const _TrayTitleState({required this.traffic, required this.showTrayTitle});
|
||||||
|
|
||||||
|
|
||||||
|
@override final Traffic traffic;
|
||||||
|
@override final bool showTrayTitle;
|
||||||
|
|
||||||
|
/// Create a copy of TrayTitleState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$TrayTitleStateCopyWith<_TrayTitleState> get copyWith => __$TrayTitleStateCopyWithImpl<_TrayTitleState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TrayTitleState&&(identical(other.traffic, traffic) || other.traffic == traffic)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,traffic,showTrayTitle);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'TrayTitleState(traffic: $traffic, showTrayTitle: $showTrayTitle)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$TrayTitleStateCopyWith<$Res> implements $TrayTitleStateCopyWith<$Res> {
|
||||||
|
factory _$TrayTitleStateCopyWith(_TrayTitleState value, $Res Function(_TrayTitleState) _then) = __$TrayTitleStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
Traffic traffic, bool showTrayTitle
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $TrafficCopyWith<$Res> get traffic;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$TrayTitleStateCopyWithImpl<$Res>
|
||||||
|
implements _$TrayTitleStateCopyWith<$Res> {
|
||||||
|
__$TrayTitleStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _TrayTitleState _self;
|
||||||
|
final $Res Function(_TrayTitleState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of TrayTitleState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? traffic = null,Object? showTrayTitle = null,}) {
|
||||||
|
return _then(_TrayTitleState(
|
||||||
|
traffic: null == traffic ? _self.traffic : traffic // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Traffic,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of TrayTitleState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$TrafficCopyWith<$Res> get traffic {
|
||||||
|
|
||||||
|
return $TrafficCopyWith<$Res>(_self.traffic, (value) {
|
||||||
|
return _then(_self.copyWith(traffic: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$NavigationState {
|
mixin _$NavigationState {
|
||||||
|
|
||||||
@@ -6572,4 +6853,303 @@ $OverrideDataCopyWith<$Res>? get overrideData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$SetupState {
|
||||||
|
|
||||||
|
String? get profileId; int? get profileLastUpdateDate; OverwriteType get overwriteType; List<Rule> get addedRules; String? get scriptContent; bool get overrideDns; Dns get dns;
|
||||||
|
/// Create a copy of SetupState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SetupStateCopyWith<SetupState> get copyWith => _$SetupStateCopyWithImpl<SetupState>(this as SetupState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SetupState&&(identical(other.profileId, profileId) || other.profileId == profileId)&&(identical(other.profileLastUpdateDate, profileLastUpdateDate) || other.profileLastUpdateDate == profileLastUpdateDate)&&(identical(other.overwriteType, overwriteType) || other.overwriteType == overwriteType)&&const DeepCollectionEquality().equals(other.addedRules, addedRules)&&(identical(other.scriptContent, scriptContent) || other.scriptContent == scriptContent)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.dns, dns) || other.dns == dns));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,profileId,profileLastUpdateDate,overwriteType,const DeepCollectionEquality().hash(addedRules),scriptContent,overrideDns,dns);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SetupState(profileId: $profileId, profileLastUpdateDate: $profileLastUpdateDate, overwriteType: $overwriteType, addedRules: $addedRules, scriptContent: $scriptContent, overrideDns: $overrideDns, dns: $dns)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $SetupStateCopyWith<$Res> {
|
||||||
|
factory $SetupStateCopyWith(SetupState value, $Res Function(SetupState) _then) = _$SetupStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String? profileId, int? profileLastUpdateDate, OverwriteType overwriteType, List<Rule> addedRules, String? scriptContent, bool overrideDns, Dns dns
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$DnsCopyWith<$Res> get dns;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$SetupStateCopyWithImpl<$Res>
|
||||||
|
implements $SetupStateCopyWith<$Res> {
|
||||||
|
_$SetupStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final SetupState _self;
|
||||||
|
final $Res Function(SetupState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SetupState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? profileId = freezed,Object? profileLastUpdateDate = freezed,Object? overwriteType = null,Object? addedRules = null,Object? scriptContent = freezed,Object? overrideDns = null,Object? dns = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
profileId: freezed == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,profileLastUpdateDate: freezed == profileLastUpdateDate ? _self.profileLastUpdateDate : profileLastUpdateDate // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int?,overwriteType: null == overwriteType ? _self.overwriteType : overwriteType // ignore: cast_nullable_to_non_nullable
|
||||||
|
as OverwriteType,addedRules: null == addedRules ? _self.addedRules : addedRules // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<Rule>,scriptContent: freezed == scriptContent ? _self.scriptContent : scriptContent // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,overrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,dns: null == dns ? _self.dns : dns // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Dns,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
/// Create a copy of SetupState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$DnsCopyWith<$Res> get dns {
|
||||||
|
|
||||||
|
return $DnsCopyWith<$Res>(_self.dns, (value) {
|
||||||
|
return _then(_self.copyWith(dns: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [SetupState].
|
||||||
|
extension SetupStatePatterns on SetupState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SetupState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SetupState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SetupState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SetupState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SetupState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SetupState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? profileId, int? profileLastUpdateDate, OverwriteType overwriteType, List<Rule> addedRules, String? scriptContent, bool overrideDns, Dns dns)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SetupState() when $default != null:
|
||||||
|
return $default(_that.profileId,_that.profileLastUpdateDate,_that.overwriteType,_that.addedRules,_that.scriptContent,_that.overrideDns,_that.dns);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? profileId, int? profileLastUpdateDate, OverwriteType overwriteType, List<Rule> addedRules, String? scriptContent, bool overrideDns, Dns dns) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SetupState():
|
||||||
|
return $default(_that.profileId,_that.profileLastUpdateDate,_that.overwriteType,_that.addedRules,_that.scriptContent,_that.overrideDns,_that.dns);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? profileId, int? profileLastUpdateDate, OverwriteType overwriteType, List<Rule> addedRules, String? scriptContent, bool overrideDns, Dns dns)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SetupState() when $default != null:
|
||||||
|
return $default(_that.profileId,_that.profileLastUpdateDate,_that.overwriteType,_that.addedRules,_that.scriptContent,_that.overrideDns,_that.dns);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _SetupState implements SetupState {
|
||||||
|
const _SetupState({required this.profileId, required this.profileLastUpdateDate, required this.overwriteType, required final List<Rule> addedRules, required this.scriptContent, required this.overrideDns, required this.dns}): _addedRules = addedRules;
|
||||||
|
|
||||||
|
|
||||||
|
@override final String? profileId;
|
||||||
|
@override final int? profileLastUpdateDate;
|
||||||
|
@override final OverwriteType overwriteType;
|
||||||
|
final List<Rule> _addedRules;
|
||||||
|
@override List<Rule> get addedRules {
|
||||||
|
if (_addedRules is EqualUnmodifiableListView) return _addedRules;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableListView(_addedRules);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override final String? scriptContent;
|
||||||
|
@override final bool overrideDns;
|
||||||
|
@override final Dns dns;
|
||||||
|
|
||||||
|
/// Create a copy of SetupState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SetupStateCopyWith<_SetupState> get copyWith => __$SetupStateCopyWithImpl<_SetupState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SetupState&&(identical(other.profileId, profileId) || other.profileId == profileId)&&(identical(other.profileLastUpdateDate, profileLastUpdateDate) || other.profileLastUpdateDate == profileLastUpdateDate)&&(identical(other.overwriteType, overwriteType) || other.overwriteType == overwriteType)&&const DeepCollectionEquality().equals(other._addedRules, _addedRules)&&(identical(other.scriptContent, scriptContent) || other.scriptContent == scriptContent)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.dns, dns) || other.dns == dns));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,profileId,profileLastUpdateDate,overwriteType,const DeepCollectionEquality().hash(_addedRules),scriptContent,overrideDns,dns);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SetupState(profileId: $profileId, profileLastUpdateDate: $profileLastUpdateDate, overwriteType: $overwriteType, addedRules: $addedRules, scriptContent: $scriptContent, overrideDns: $overrideDns, dns: $dns)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SetupStateCopyWith<$Res> implements $SetupStateCopyWith<$Res> {
|
||||||
|
factory _$SetupStateCopyWith(_SetupState value, $Res Function(_SetupState) _then) = __$SetupStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String? profileId, int? profileLastUpdateDate, OverwriteType overwriteType, List<Rule> addedRules, String? scriptContent, bool overrideDns, Dns dns
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $DnsCopyWith<$Res> get dns;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SetupStateCopyWithImpl<$Res>
|
||||||
|
implements _$SetupStateCopyWith<$Res> {
|
||||||
|
__$SetupStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SetupState _self;
|
||||||
|
final $Res Function(_SetupState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SetupState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? profileId = freezed,Object? profileLastUpdateDate = freezed,Object? overwriteType = null,Object? addedRules = null,Object? scriptContent = freezed,Object? overrideDns = null,Object? dns = null,}) {
|
||||||
|
return _then(_SetupState(
|
||||||
|
profileId: freezed == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,profileLastUpdateDate: freezed == profileLastUpdateDate ? _self.profileLastUpdateDate : profileLastUpdateDate // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int?,overwriteType: null == overwriteType ? _self.overwriteType : overwriteType // ignore: cast_nullable_to_non_nullable
|
||||||
|
as OverwriteType,addedRules: null == addedRules ? _self._addedRules : addedRules // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<Rule>,scriptContent: freezed == scriptContent ? _self.scriptContent : scriptContent // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,overrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,dns: null == dns ? _self.dns : dns // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Dns,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of SetupState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$DnsCopyWith<$Res> get dns {
|
||||||
|
|
||||||
|
return $DnsCopyWith<$Res>(_self.dns, (value) {
|
||||||
|
return _then(_self.copyWith(dns: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// dart format on
|
// dart format on
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ as bool,
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$CommonMessage {
|
mixin _$CommonMessage {
|
||||||
|
|
||||||
String get id; String get text; Duration get duration;
|
String get id; String get text; Duration get duration; MessageActionState? get actionState;
|
||||||
/// Create a copy of CommonMessage
|
/// Create a copy of CommonMessage
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -282,16 +282,16 @@ $CommonMessageCopyWith<CommonMessage> get copyWith => _$CommonMessageCopyWithImp
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CommonMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.text, text) || other.text == text)&&(identical(other.duration, duration) || other.duration == duration));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is CommonMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.text, text) || other.text == text)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.actionState, actionState) || other.actionState == actionState));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,text,duration);
|
int get hashCode => Object.hash(runtimeType,id,text,duration,actionState);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'CommonMessage(id: $id, text: $text, duration: $duration)';
|
return 'CommonMessage(id: $id, text: $text, duration: $duration, actionState: $actionState)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -302,11 +302,11 @@ abstract mixin class $CommonMessageCopyWith<$Res> {
|
|||||||
factory $CommonMessageCopyWith(CommonMessage value, $Res Function(CommonMessage) _then) = _$CommonMessageCopyWithImpl;
|
factory $CommonMessageCopyWith(CommonMessage value, $Res Function(CommonMessage) _then) = _$CommonMessageCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String text, Duration duration
|
String id, String text, Duration duration, MessageActionState? actionState
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$MessageActionStateCopyWith<$Res>? get actionState;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -319,15 +319,28 @@ class _$CommonMessageCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of CommonMessage
|
/// Create a copy of CommonMessage
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? text = null,Object? duration = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? text = null,Object? duration = null,Object? actionState = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable
|
as String,text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable
|
||||||
as String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
|
as String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
|
||||||
as Duration,
|
as Duration,actionState: freezed == actionState ? _self.actionState : actionState // ignore: cast_nullable_to_non_nullable
|
||||||
|
as MessageActionState?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
/// Create a copy of CommonMessage
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$MessageActionStateCopyWith<$Res>? get actionState {
|
||||||
|
if (_self.actionState == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $MessageActionStateCopyWith<$Res>(_self.actionState!, (value) {
|
||||||
|
return _then(_self.copyWith(actionState: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -409,10 +422,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String text, Duration duration)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String text, Duration duration, MessageActionState? actionState)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _CommonMessage() when $default != null:
|
case _CommonMessage() when $default != null:
|
||||||
return $default(_that.id,_that.text,_that.duration);case _:
|
return $default(_that.id,_that.text,_that.duration,_that.actionState);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -430,10 +443,10 @@ return $default(_that.id,_that.text,_that.duration);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String text, Duration duration) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String text, Duration duration, MessageActionState? actionState) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _CommonMessage():
|
case _CommonMessage():
|
||||||
return $default(_that.id,_that.text,_that.duration);case _:
|
return $default(_that.id,_that.text,_that.duration,_that.actionState);case _:
|
||||||
throw StateError('Unexpected subclass');
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -450,10 +463,10 @@ return $default(_that.id,_that.text,_that.duration);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String text, Duration duration)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String text, Duration duration, MessageActionState? actionState)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _CommonMessage() when $default != null:
|
case _CommonMessage() when $default != null:
|
||||||
return $default(_that.id,_that.text,_that.duration);case _:
|
return $default(_that.id,_that.text,_that.duration,_that.actionState);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -465,12 +478,13 @@ return $default(_that.id,_that.text,_that.duration);case _:
|
|||||||
|
|
||||||
|
|
||||||
class _CommonMessage implements CommonMessage {
|
class _CommonMessage implements CommonMessage {
|
||||||
const _CommonMessage({required this.id, required this.text, this.duration = const Duration(seconds: 3)});
|
const _CommonMessage({required this.id, required this.text, this.duration = const Duration(seconds: 3), this.actionState});
|
||||||
|
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@override final String text;
|
@override final String text;
|
||||||
@override@JsonKey() final Duration duration;
|
@override@JsonKey() final Duration duration;
|
||||||
|
@override final MessageActionState? actionState;
|
||||||
|
|
||||||
/// Create a copy of CommonMessage
|
/// Create a copy of CommonMessage
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -482,16 +496,16 @@ _$CommonMessageCopyWith<_CommonMessage> get copyWith => __$CommonMessageCopyWith
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CommonMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.text, text) || other.text == text)&&(identical(other.duration, duration) || other.duration == duration));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CommonMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.text, text) || other.text == text)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.actionState, actionState) || other.actionState == actionState));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,text,duration);
|
int get hashCode => Object.hash(runtimeType,id,text,duration,actionState);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'CommonMessage(id: $id, text: $text, duration: $duration)';
|
return 'CommonMessage(id: $id, text: $text, duration: $duration, actionState: $actionState)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -502,11 +516,11 @@ abstract mixin class _$CommonMessageCopyWith<$Res> implements $CommonMessageCopy
|
|||||||
factory _$CommonMessageCopyWith(_CommonMessage value, $Res Function(_CommonMessage) _then) = __$CommonMessageCopyWithImpl;
|
factory _$CommonMessageCopyWith(_CommonMessage value, $Res Function(_CommonMessage) _then) = __$CommonMessageCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String text, Duration duration
|
String id, String text, Duration duration, MessageActionState? actionState
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $MessageActionStateCopyWith<$Res>? get actionState;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -519,12 +533,285 @@ class __$CommonMessageCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of CommonMessage
|
/// Create a copy of CommonMessage
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? text = null,Object? duration = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? text = null,Object? duration = null,Object? actionState = freezed,}) {
|
||||||
return _then(_CommonMessage(
|
return _then(_CommonMessage(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable
|
as String,text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable
|
||||||
as String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
|
as String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable
|
||||||
as Duration,
|
as Duration,actionState: freezed == actionState ? _self.actionState : actionState // ignore: cast_nullable_to_non_nullable
|
||||||
|
as MessageActionState?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of CommonMessage
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$MessageActionStateCopyWith<$Res>? get actionState {
|
||||||
|
if (_self.actionState == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $MessageActionStateCopyWith<$Res>(_self.actionState!, (value) {
|
||||||
|
return _then(_self.copyWith(actionState: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$MessageActionState {
|
||||||
|
|
||||||
|
String get actionText; VoidCallback get action;
|
||||||
|
/// Create a copy of MessageActionState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$MessageActionStateCopyWith<MessageActionState> get copyWith => _$MessageActionStateCopyWithImpl<MessageActionState>(this as MessageActionState, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is MessageActionState&&(identical(other.actionText, actionText) || other.actionText == actionText)&&(identical(other.action, action) || other.action == action));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,actionText,action);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'MessageActionState(actionText: $actionText, action: $action)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $MessageActionStateCopyWith<$Res> {
|
||||||
|
factory $MessageActionStateCopyWith(MessageActionState value, $Res Function(MessageActionState) _then) = _$MessageActionStateCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String actionText, VoidCallback action
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$MessageActionStateCopyWithImpl<$Res>
|
||||||
|
implements $MessageActionStateCopyWith<$Res> {
|
||||||
|
_$MessageActionStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final MessageActionState _self;
|
||||||
|
final $Res Function(MessageActionState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of MessageActionState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? actionText = null,Object? action = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
actionText: null == actionText ? _self.actionText : actionText // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable
|
||||||
|
as VoidCallback,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [MessageActionState].
|
||||||
|
extension MessageActionStatePatterns on MessageActionState {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _MessageActionState value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MessageActionState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _MessageActionState value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MessageActionState():
|
||||||
|
return $default(_that);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _MessageActionState value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MessageActionState() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String actionText, VoidCallback action)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MessageActionState() when $default != null:
|
||||||
|
return $default(_that.actionText,_that.action);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String actionText, VoidCallback action) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MessageActionState():
|
||||||
|
return $default(_that.actionText,_that.action);case _:
|
||||||
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String actionText, VoidCallback action)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MessageActionState() when $default != null:
|
||||||
|
return $default(_that.actionText,_that.action);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _MessageActionState implements MessageActionState {
|
||||||
|
const _MessageActionState({required this.actionText, required this.action});
|
||||||
|
|
||||||
|
|
||||||
|
@override final String actionText;
|
||||||
|
@override final VoidCallback action;
|
||||||
|
|
||||||
|
/// Create a copy of MessageActionState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$MessageActionStateCopyWith<_MessageActionState> get copyWith => __$MessageActionStateCopyWithImpl<_MessageActionState>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MessageActionState&&(identical(other.actionText, actionText) || other.actionText == actionText)&&(identical(other.action, action) || other.action == action));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,actionText,action);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'MessageActionState(actionText: $actionText, action: $action)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$MessageActionStateCopyWith<$Res> implements $MessageActionStateCopyWith<$Res> {
|
||||||
|
factory _$MessageActionStateCopyWith(_MessageActionState value, $Res Function(_MessageActionState) _then) = __$MessageActionStateCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String actionText, VoidCallback action
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$MessageActionStateCopyWithImpl<$Res>
|
||||||
|
implements _$MessageActionStateCopyWith<$Res> {
|
||||||
|
__$MessageActionStateCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _MessageActionState _self;
|
||||||
|
final $Res Function(_MessageActionState) _then;
|
||||||
|
|
||||||
|
/// Create a copy of MessageActionState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? actionText = null,Object? action = null,}) {
|
||||||
|
return _then(_MessageActionState(
|
||||||
|
actionText: null == actionText ? _self.actionText : actionText // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable
|
||||||
|
as VoidCallback,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -851,7 +1138,7 @@ $AppBarEditStateCopyWith<$Res>? get editState {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$AppBarSearchState {
|
mixin _$AppBarSearchState {
|
||||||
|
|
||||||
Function(String) get onSearch; String? get query;
|
Function(String) get onSearch; bool get autoAddSearch; String? get query;
|
||||||
/// Create a copy of AppBarSearchState
|
/// Create a copy of AppBarSearchState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -862,16 +1149,16 @@ $AppBarSearchStateCopyWith<AppBarSearchState> get copyWith => _$AppBarSearchStat
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppBarSearchState&&(identical(other.onSearch, onSearch) || other.onSearch == onSearch)&&(identical(other.query, query) || other.query == query));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppBarSearchState&&(identical(other.onSearch, onSearch) || other.onSearch == onSearch)&&(identical(other.autoAddSearch, autoAddSearch) || other.autoAddSearch == autoAddSearch)&&(identical(other.query, query) || other.query == query));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,onSearch,query);
|
int get hashCode => Object.hash(runtimeType,onSearch,autoAddSearch,query);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AppBarSearchState(onSearch: $onSearch, query: $query)';
|
return 'AppBarSearchState(onSearch: $onSearch, autoAddSearch: $autoAddSearch, query: $query)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -882,7 +1169,7 @@ abstract mixin class $AppBarSearchStateCopyWith<$Res> {
|
|||||||
factory $AppBarSearchStateCopyWith(AppBarSearchState value, $Res Function(AppBarSearchState) _then) = _$AppBarSearchStateCopyWithImpl;
|
factory $AppBarSearchStateCopyWith(AppBarSearchState value, $Res Function(AppBarSearchState) _then) = _$AppBarSearchStateCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
Function(String) onSearch, String? query
|
Function(String) onSearch, bool autoAddSearch, String? query
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -899,10 +1186,11 @@ class _$AppBarSearchStateCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of AppBarSearchState
|
/// Create a copy of AppBarSearchState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? onSearch = null,Object? query = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? onSearch = null,Object? autoAddSearch = null,Object? query = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
onSearch: null == onSearch ? _self.onSearch : onSearch // ignore: cast_nullable_to_non_nullable
|
onSearch: null == onSearch ? _self.onSearch : onSearch // ignore: cast_nullable_to_non_nullable
|
||||||
as Function(String),query: freezed == query ? _self.query : query // ignore: cast_nullable_to_non_nullable
|
as Function(String),autoAddSearch: null == autoAddSearch ? _self.autoAddSearch : autoAddSearch // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,query: freezed == query ? _self.query : query // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -988,10 +1276,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Function(String) onSearch, String? query)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Function(String) onSearch, bool autoAddSearch, String? query)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppBarSearchState() when $default != null:
|
case _AppBarSearchState() when $default != null:
|
||||||
return $default(_that.onSearch,_that.query);case _:
|
return $default(_that.onSearch,_that.autoAddSearch,_that.query);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1009,10 +1297,10 @@ return $default(_that.onSearch,_that.query);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Function(String) onSearch, String? query) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Function(String) onSearch, bool autoAddSearch, String? query) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppBarSearchState():
|
case _AppBarSearchState():
|
||||||
return $default(_that.onSearch,_that.query);case _:
|
return $default(_that.onSearch,_that.autoAddSearch,_that.query);case _:
|
||||||
throw StateError('Unexpected subclass');
|
throw StateError('Unexpected subclass');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1029,10 +1317,10 @@ return $default(_that.onSearch,_that.query);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Function(String) onSearch, String? query)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Function(String) onSearch, bool autoAddSearch, String? query)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppBarSearchState() when $default != null:
|
case _AppBarSearchState() when $default != null:
|
||||||
return $default(_that.onSearch,_that.query);case _:
|
return $default(_that.onSearch,_that.autoAddSearch,_that.query);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1044,10 +1332,11 @@ return $default(_that.onSearch,_that.query);case _:
|
|||||||
|
|
||||||
|
|
||||||
class _AppBarSearchState implements AppBarSearchState {
|
class _AppBarSearchState implements AppBarSearchState {
|
||||||
const _AppBarSearchState({required this.onSearch, this.query = null});
|
const _AppBarSearchState({required this.onSearch, this.autoAddSearch = true, this.query = null});
|
||||||
|
|
||||||
|
|
||||||
@override final Function(String) onSearch;
|
@override final Function(String) onSearch;
|
||||||
|
@override@JsonKey() final bool autoAddSearch;
|
||||||
@override@JsonKey() final String? query;
|
@override@JsonKey() final String? query;
|
||||||
|
|
||||||
/// Create a copy of AppBarSearchState
|
/// Create a copy of AppBarSearchState
|
||||||
@@ -1060,16 +1349,16 @@ _$AppBarSearchStateCopyWith<_AppBarSearchState> get copyWith => __$AppBarSearchS
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppBarSearchState&&(identical(other.onSearch, onSearch) || other.onSearch == onSearch)&&(identical(other.query, query) || other.query == query));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppBarSearchState&&(identical(other.onSearch, onSearch) || other.onSearch == onSearch)&&(identical(other.autoAddSearch, autoAddSearch) || other.autoAddSearch == autoAddSearch)&&(identical(other.query, query) || other.query == query));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,onSearch,query);
|
int get hashCode => Object.hash(runtimeType,onSearch,autoAddSearch,query);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AppBarSearchState(onSearch: $onSearch, query: $query)';
|
return 'AppBarSearchState(onSearch: $onSearch, autoAddSearch: $autoAddSearch, query: $query)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1080,7 +1369,7 @@ abstract mixin class _$AppBarSearchStateCopyWith<$Res> implements $AppBarSearchS
|
|||||||
factory _$AppBarSearchStateCopyWith(_AppBarSearchState value, $Res Function(_AppBarSearchState) _then) = __$AppBarSearchStateCopyWithImpl;
|
factory _$AppBarSearchStateCopyWith(_AppBarSearchState value, $Res Function(_AppBarSearchState) _then) = __$AppBarSearchStateCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
Function(String) onSearch, String? query
|
Function(String) onSearch, bool autoAddSearch, String? query
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1097,10 +1386,11 @@ class __$AppBarSearchStateCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of AppBarSearchState
|
/// Create a copy of AppBarSearchState
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? onSearch = null,Object? query = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? onSearch = null,Object? autoAddSearch = null,Object? query = freezed,}) {
|
||||||
return _then(_AppBarSearchState(
|
return _then(_AppBarSearchState(
|
||||||
onSearch: null == onSearch ? _self.onSearch : onSearch // ignore: cast_nullable_to_non_nullable
|
onSearch: null == onSearch ? _self.onSearch : onSearch // ignore: cast_nullable_to_non_nullable
|
||||||
as Function(String),query: freezed == query ? _self.query : query // ignore: cast_nullable_to_non_nullable
|
as Function(String),autoAddSearch: null == autoAddSearch ? _self.autoAddSearch : autoAddSearch // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,query: freezed == query ? _self.query : query // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:isolate';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:fl_clash/common/common.dart';
|
import 'package:fl_clash/common/common.dart';
|
||||||
@@ -11,8 +12,6 @@ import 'clash_config.dart';
|
|||||||
part 'generated/profile.freezed.dart';
|
part 'generated/profile.freezed.dart';
|
||||||
part 'generated/profile.g.dart';
|
part 'generated/profile.g.dart';
|
||||||
|
|
||||||
typedef SelectedMap = Map<String, String>;
|
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class SubscriptionInfo with _$SubscriptionInfo {
|
abstract class SubscriptionInfo with _$SubscriptionInfo {
|
||||||
const factory SubscriptionInfo({
|
const factory SubscriptionInfo({
|
||||||
@@ -53,9 +52,10 @@ abstract class Profile with _$Profile {
|
|||||||
required Duration autoUpdateDuration,
|
required Duration autoUpdateDuration,
|
||||||
SubscriptionInfo? subscriptionInfo,
|
SubscriptionInfo? subscriptionInfo,
|
||||||
@Default(true) bool autoUpdate,
|
@Default(true) bool autoUpdate,
|
||||||
@Default({}) SelectedMap selectedMap,
|
@Default({}) Map<String, String> selectedMap,
|
||||||
@Default({}) Set<String> unfoldSet,
|
@Default({}) Set<String> unfoldSet,
|
||||||
@Default(OverrideData()) OverrideData overrideData,
|
@Default(OverrideData()) OverrideData overrideData,
|
||||||
|
@Default(Overwrite()) Overwrite overwrite,
|
||||||
@JsonKey(includeToJson: false, includeFromJson: false)
|
@JsonKey(includeToJson: false, includeFromJson: false)
|
||||||
@Default(false)
|
@Default(false)
|
||||||
bool isUpdating,
|
bool isUpdating,
|
||||||
@@ -74,6 +74,37 @@ abstract class Profile with _$Profile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class Overwrite with _$Overwrite {
|
||||||
|
const factory Overwrite({
|
||||||
|
@Default(OverwriteType.standard) OverwriteType type,
|
||||||
|
@Default(StandardOverwrite()) StandardOverwrite standardOverwrite,
|
||||||
|
@Default(ScriptOverwrite()) ScriptOverwrite scriptOverwrite,
|
||||||
|
}) = _Overwrite;
|
||||||
|
|
||||||
|
factory Overwrite.fromJson(Map<String, Object?> json) =>
|
||||||
|
_$OverwriteFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class StandardOverwrite with _$StandardOverwrite {
|
||||||
|
const factory StandardOverwrite({
|
||||||
|
@Default([]) List<Rule> addedRules,
|
||||||
|
@Default([]) List<String> disabledRuleIds,
|
||||||
|
}) = _StandardOverwrite;
|
||||||
|
|
||||||
|
factory StandardOverwrite.fromJson(Map<String, Object?> json) =>
|
||||||
|
_$StandardOverwriteFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class ScriptOverwrite with _$ScriptOverwrite {
|
||||||
|
const factory ScriptOverwrite({String? scriptId}) = _ScriptOverwrite;
|
||||||
|
|
||||||
|
factory ScriptOverwrite.fromJson(Map<String, Object?> json) =>
|
||||||
|
_$ScriptOverwriteFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class OverrideData with _$OverrideData {
|
abstract class OverrideData with _$OverrideData {
|
||||||
const factory OverrideData({
|
const factory OverrideData({
|
||||||
@@ -85,15 +116,6 @@ abstract class OverrideData with _$OverrideData {
|
|||||||
_$OverrideDataFromJson(json);
|
_$OverrideDataFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
extension OverrideDataExt on OverrideData {
|
|
||||||
List<String> get runningRule {
|
|
||||||
if (!enable) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
return rule.rules.map((item) => item.value).toList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class OverrideRule with _$OverrideRule {
|
abstract class OverrideRule with _$OverrideRule {
|
||||||
const factory OverrideRule({
|
const factory OverrideRule({
|
||||||
@@ -106,6 +128,15 @@ abstract class OverrideRule with _$OverrideRule {
|
|||||||
_$OverrideRuleFromJson(json);
|
_$OverrideRuleFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension OverrideDataExt on OverrideData {
|
||||||
|
List<String> get runningRule {
|
||||||
|
if (!enable) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return rule.rules.map((item) => item.value).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extension OverrideRuleExt on OverrideRule {
|
extension OverrideRuleExt on OverrideRule {
|
||||||
List<Rule> get rules => switch (type == OverrideRuleType.override) {
|
List<Rule> get rules => switch (type == OverrideRuleType.override) {
|
||||||
true => overrideRules,
|
true => overrideRules,
|
||||||
@@ -169,7 +200,7 @@ extension ProfileExtension on Profile {
|
|||||||
return await copyWith(
|
return await copyWith(
|
||||||
label: label ?? utils.getFileNameForDisposition(disposition) ?? id,
|
label: label ?? utils.getFileNameForDisposition(disposition) ?? id,
|
||||||
subscriptionInfo: SubscriptionInfo.formHString(userinfo),
|
subscriptionInfo: SubscriptionInfo.formHString(userinfo),
|
||||||
).saveFile(response.data);
|
).saveFile(response.data ?? Uint8List.fromList([]));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Profile> saveFile(Uint8List bytes) async {
|
Future<Profile> saveFile(Uint8List bytes) async {
|
||||||
@@ -178,7 +209,9 @@ extension ProfileExtension on Profile {
|
|||||||
throw message;
|
throw message;
|
||||||
}
|
}
|
||||||
final file = await getFile();
|
final file = await getFile();
|
||||||
await file.writeAsBytes(bytes);
|
await Isolate.run(() async {
|
||||||
|
return await file.writeAsBytes(bytes);
|
||||||
|
});
|
||||||
return copyWith(lastUpdateDate: DateTime.now());
|
return copyWith(lastUpdateDate: DateTime.now());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
|
import 'package:fl_clash/common/common.dart';
|
||||||
import 'package:fl_clash/enum/enum.dart';
|
import 'package:fl_clash/enum/enum.dart';
|
||||||
import 'package:fl_clash/models/models.dart';
|
import 'package:fl_clash/models/models.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -69,10 +70,19 @@ abstract class TrayState with _$TrayState {
|
|||||||
required String? locale,
|
required String? locale,
|
||||||
required Brightness? brightness,
|
required Brightness? brightness,
|
||||||
required List<Group> groups,
|
required List<Group> groups,
|
||||||
required SelectedMap selectedMap,
|
required Map<String, String> selectedMap,
|
||||||
|
required bool showTrayTitle,
|
||||||
}) = _TrayState;
|
}) = _TrayState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class TrayTitleState with _$TrayTitleState {
|
||||||
|
const factory TrayTitleState({
|
||||||
|
required Traffic traffic,
|
||||||
|
required bool showTrayTitle,
|
||||||
|
}) = _TrayTitleState;
|
||||||
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class NavigationState with _$NavigationState {
|
abstract class NavigationState with _$NavigationState {
|
||||||
const factory NavigationState({
|
const factory NavigationState({
|
||||||
@@ -246,3 +256,54 @@ abstract class ProfileOverrideModel with _$ProfileOverrideModel {
|
|||||||
OverrideData? overrideData,
|
OverrideData? overrideData,
|
||||||
}) = _ProfileOverrideModel;
|
}) = _ProfileOverrideModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class SetupState with _$SetupState {
|
||||||
|
const factory SetupState({
|
||||||
|
required String? profileId,
|
||||||
|
required int? profileLastUpdateDate,
|
||||||
|
required OverwriteType overwriteType,
|
||||||
|
required List<Rule> addedRules,
|
||||||
|
required String? scriptContent,
|
||||||
|
required bool overrideDns,
|
||||||
|
required Dns dns,
|
||||||
|
}) = _SetupState;
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SetupStateExt on SetupState {
|
||||||
|
bool needSetup(SetupState? lastSetupState) {
|
||||||
|
if (lastSetupState == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (profileId != lastSetupState.profileId) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (profileLastUpdateDate != lastSetupState.profileLastUpdateDate) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (overwriteType != lastSetupState.overwriteType) {
|
||||||
|
if (!ruleListEquality.equals(addedRules, lastSetupState.addedRules) ||
|
||||||
|
scriptContent != lastSetupState.scriptContent) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (overwriteType == OverwriteType.script) {
|
||||||
|
if (scriptContent != lastSetupState.scriptContent) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (overwriteType == OverwriteType.standard) {
|
||||||
|
if (!ruleListEquality.equals(addedRules, lastSetupState.addedRules)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (overrideDns != lastSetupState.overrideDns) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (overrideDns == true && dns != lastSetupState.dns) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,9 +5,7 @@ part 'generated/widget.freezed.dart';
|
|||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class ActivateState with _$ActivateState {
|
abstract class ActivateState with _$ActivateState {
|
||||||
const factory ActivateState({
|
const factory ActivateState({required bool active}) = _ActivateState;
|
||||||
required bool active,
|
|
||||||
}) = _ActivateState;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
@@ -16,9 +14,18 @@ abstract class CommonMessage with _$CommonMessage {
|
|||||||
required String id,
|
required String id,
|
||||||
required String text,
|
required String text,
|
||||||
@Default(Duration(seconds: 3)) Duration duration,
|
@Default(Duration(seconds: 3)) Duration duration,
|
||||||
|
MessageActionState? actionState,
|
||||||
}) = _CommonMessage;
|
}) = _CommonMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class MessageActionState with _$MessageActionState {
|
||||||
|
const factory MessageActionState({
|
||||||
|
required String actionText,
|
||||||
|
required VoidCallback action,
|
||||||
|
}) = _MessageActionState;
|
||||||
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
abstract class AppBarState with _$AppBarState {
|
abstract class AppBarState with _$AppBarState {
|
||||||
const factory AppBarState({
|
const factory AppBarState({
|
||||||
@@ -32,6 +39,7 @@ abstract class AppBarState with _$AppBarState {
|
|||||||
abstract class AppBarSearchState with _$AppBarSearchState {
|
abstract class AppBarSearchState with _$AppBarSearchState {
|
||||||
const factory AppBarSearchState({
|
const factory AppBarSearchState({
|
||||||
required Function(String) onSearch,
|
required Function(String) onSearch,
|
||||||
|
@Default(true) bool autoAddSearch,
|
||||||
@Default(null) String? query,
|
@Default(null) String? query,
|
||||||
}) = _AppBarSearchState;
|
}) = _AppBarSearchState;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:re_editor/re_editor.dart';
|
import 'package:re_editor/re_editor.dart';
|
||||||
import 'package:re_highlight/languages/javascript.dart';
|
import 'package:re_highlight/languages/javascript.dart';
|
||||||
|
import 'package:re_highlight/languages/json.dart';
|
||||||
import 'package:re_highlight/languages/yaml.dart';
|
import 'package:re_highlight/languages/yaml.dart';
|
||||||
import 'package:re_highlight/styles/atom-one-light.dart';
|
import 'package:re_highlight/styles/atom-one-light.dart';
|
||||||
|
|
||||||
@@ -48,11 +49,16 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
late CodeLineEditingController _controller;
|
late CodeLineEditingController _controller;
|
||||||
late CodeFindController _findController;
|
late CodeFindController _findController;
|
||||||
late TextEditingController _titleController;
|
late TextEditingController _titleController;
|
||||||
final _focusNode = FocusNode();
|
late FocusNode _focusNode;
|
||||||
|
late bool readOnly = false;
|
||||||
|
late final SelectionToolbarController _toolbarController;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
readOnly = widget.onSave == null;
|
||||||
|
_toolbarController = ContextMenuControllerImpl(readOnly);
|
||||||
|
_focusNode = FocusNode(canRequestFocus: !readOnly);
|
||||||
_controller = CodeLineEditingController.fromText(widget.content);
|
_controller = CodeLineEditingController.fromText(widget.content);
|
||||||
_findController = CodeFindController(_controller);
|
_findController = CodeFindController(_controller);
|
||||||
_titleController = TextEditingController(text: widget.title);
|
_titleController = TextEditingController(text: widget.title);
|
||||||
@@ -85,6 +91,7 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
_toolbarController.hide(context);
|
||||||
_findController.dispose();
|
_findController.dispose();
|
||||||
_controller.dispose();
|
_controller.dispose();
|
||||||
_focusNode.dispose();
|
_focusNode.dispose();
|
||||||
@@ -113,25 +120,19 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
_findController.findMode();
|
_findController.findMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _handleImport() async {
|
Future<void> _handleImportFormFile() async {
|
||||||
final option = await globalState.showCommonDialog<ImportOption>(
|
final file = await picker.pickerFile();
|
||||||
child: _ImportOptionsDialog(),
|
if (file == null) {
|
||||||
);
|
|
||||||
if (option == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (option == ImportOption.file) {
|
|
||||||
final file = await picker.pickerFile();
|
|
||||||
if (file == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final res = String.fromCharCodes(file.bytes?.toList() ?? []);
|
|
||||||
_controller.text = res;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final res = String.fromCharCodes(file.bytes?.toList() ?? []);
|
||||||
|
_controller.text = res;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _handleImportFormUrl() async {
|
||||||
final url = await globalState.showCommonDialog(
|
final url = await globalState.showCommonDialog(
|
||||||
child: InputDialog(
|
child: InputDialog(
|
||||||
title: '导入',
|
title: appLocalizations.import,
|
||||||
value: '',
|
value: '',
|
||||||
labelText: appLocalizations.url,
|
labelText: appLocalizations.url,
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
@@ -149,7 +150,7 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final res = await request.getTextResponseForUrl(url);
|
final res = await request.getTextResponseForUrl(url);
|
||||||
_controller.text = res.data;
|
_controller.text = res.data ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -173,17 +174,19 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
child: CommonScaffold(
|
child: CommonScaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: TextField(
|
title: TextField(
|
||||||
|
maxLength: 20,
|
||||||
enabled: widget.titleEditable,
|
enabled: widget.titleEditable,
|
||||||
controller: _titleController,
|
controller: _titleController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: _NoInputBorder(),
|
border: _NoInputBorder(),
|
||||||
|
counter: SizedBox(),
|
||||||
hintText: appLocalizations.unnamed,
|
hintText: appLocalizations.unnamed,
|
||||||
),
|
),
|
||||||
style: context.textTheme.titleLarge,
|
style: context.textTheme.titleLarge,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
),
|
),
|
||||||
actions: genActions([
|
actions: genActions([
|
||||||
if (widget.onSave != null)
|
if (!readOnly)
|
||||||
_wrapController(
|
_wrapController(
|
||||||
(value) => _wrapTitleController(
|
(value) => _wrapTitleController(
|
||||||
(value) => IconButton(
|
(value) => IconButton(
|
||||||
@@ -198,21 +201,17 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
icon: const Icon(Icons.save_sharp),
|
icon: const Icon(Icons.save),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (widget.supportRemoteDownload)
|
|
||||||
IconButton(
|
|
||||||
onPressed: _handleImport,
|
|
||||||
icon: Icon(Icons.arrow_downward),
|
|
||||||
),
|
|
||||||
_wrapController(
|
_wrapController(
|
||||||
(value) => CommonPopupBox(
|
(value) => CommonPopupBox(
|
||||||
targetBuilder: (open) {
|
targetBuilder: (open) {
|
||||||
return IconButton(
|
return IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
open(offset: Offset(-20, 20));
|
final isMobile = ref.read(isMobileViewProvider);
|
||||||
|
open(offset: Offset(0, isMobile ? 0 : 20));
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.more_vert),
|
icon: const Icon(Icons.more_vert),
|
||||||
);
|
);
|
||||||
@@ -234,6 +233,21 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
label: appLocalizations.redo,
|
label: appLocalizations.redo,
|
||||||
onPressed: _controller.canRedo ? _controller.redo : null,
|
onPressed: _controller.canRedo ? _controller.redo : null,
|
||||||
),
|
),
|
||||||
|
if (widget.supportRemoteDownload && !readOnly)
|
||||||
|
PopupMenuItemData(
|
||||||
|
icon: Icons.arrow_downward,
|
||||||
|
label: appLocalizations.externalFetch,
|
||||||
|
subItems: [
|
||||||
|
PopupMenuItemData(
|
||||||
|
label: appLocalizations.importUrl,
|
||||||
|
onPressed: _handleImportFormUrl,
|
||||||
|
),
|
||||||
|
PopupMenuItemData(
|
||||||
|
label: appLocalizations.importFile,
|
||||||
|
onPressed: _handleImportFormFile,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -241,6 +255,8 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
body: CodeEditor(
|
body: CodeEditor(
|
||||||
|
readOnly: readOnly,
|
||||||
|
autofocus: false,
|
||||||
findController: _findController,
|
findController: _findController,
|
||||||
findBuilder: (context, controller, readOnly) => FindPanel(
|
findBuilder: (context, controller, readOnly) => FindPanel(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
@@ -256,7 +272,7 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
toolbarController: ContextMenuControllerImpl(),
|
toolbarController: _toolbarController,
|
||||||
indicatorBuilder:
|
indicatorBuilder:
|
||||||
(context, editingController, chunkController, notifier) {
|
(context, editingController, chunkController, notifier) {
|
||||||
return Row(
|
return Row(
|
||||||
@@ -284,6 +300,8 @@ class _EditorPageState extends ConsumerState<EditorPage> {
|
|||||||
'yaml': CodeHighlightThemeMode(mode: langYaml),
|
'yaml': CodeHighlightThemeMode(mode: langYaml),
|
||||||
if (widget.languages.contains(Language.javaScript))
|
if (widget.languages.contains(Language.javaScript))
|
||||||
'javascript': CodeHighlightThemeMode(mode: langJavascript),
|
'javascript': CodeHighlightThemeMode(mode: langJavascript),
|
||||||
|
if (widget.languages.contains(Language.json))
|
||||||
|
'json': CodeHighlightThemeMode(mode: langJson),
|
||||||
},
|
},
|
||||||
theme: atomOneLightTheme,
|
theme: atomOneLightTheme,
|
||||||
),
|
),
|
||||||
@@ -340,52 +358,53 @@ class FindPanel extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
} else {
|
} else {
|
||||||
result = '${value.result!.index + 1}/${value.result!.matches.length}';
|
result = '${value.result!.index + 1}/${value.result!.matches.length}';
|
||||||
}
|
}
|
||||||
final bar = Row(
|
final bar = CommonMinIconButtonTheme(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
child: Row(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
if (!isMobileView) ...[
|
children: [
|
||||||
ConstrainedBox(
|
if (!isMobileView) ...[
|
||||||
constraints: BoxConstraints(maxWidth: 360),
|
ConstrainedBox(
|
||||||
child: _buildFindInput(context, value),
|
constraints: BoxConstraints(maxWidth: 360),
|
||||||
|
child: _buildFindInput(context, value),
|
||||||
|
),
|
||||||
|
SizedBox(width: 12),
|
||||||
|
],
|
||||||
|
Text(result, style: context.textTheme.bodyMedium),
|
||||||
|
Expanded(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
spacing: 2,
|
||||||
|
children: [
|
||||||
|
_buildIconButton(
|
||||||
|
onPressed: value.result == null
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
|
controller.previousMatch();
|
||||||
|
},
|
||||||
|
icon: Icons.arrow_upward,
|
||||||
|
),
|
||||||
|
_buildIconButton(
|
||||||
|
onPressed: value.result == null
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
|
controller.nextMatch();
|
||||||
|
},
|
||||||
|
icon: Icons.arrow_downward,
|
||||||
|
),
|
||||||
|
SizedBox(width: 2),
|
||||||
|
IconButton.filledTonal(
|
||||||
|
onPressed: controller.close,
|
||||||
|
icon: Icon(Icons.close, size: 16),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 12),
|
|
||||||
],
|
],
|
||||||
Text(result, style: context.textTheme.bodyMedium),
|
),
|
||||||
Expanded(
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
spacing: 6,
|
|
||||||
children: [
|
|
||||||
_buildIconButton(
|
|
||||||
onPressed: value.result == null
|
|
||||||
? null
|
|
||||||
: () {
|
|
||||||
controller.previousMatch();
|
|
||||||
},
|
|
||||||
icon: Icons.arrow_upward,
|
|
||||||
),
|
|
||||||
_buildIconButton(
|
|
||||||
onPressed: value.result == null
|
|
||||||
? null
|
|
||||||
: () {
|
|
||||||
controller.nextMatch();
|
|
||||||
},
|
|
||||||
icon: Icons.arrow_downward,
|
|
||||||
),
|
|
||||||
SizedBox(width: 2),
|
|
||||||
IconButton.filledTonal(
|
|
||||||
visualDensity: VisualDensity.compact,
|
|
||||||
onPressed: controller.close,
|
|
||||||
style: IconButton.styleFrom(padding: EdgeInsets.zero),
|
|
||||||
icon: Icon(Icons.close, size: 16),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
if (isMobileView) {
|
if (isMobileView) {
|
||||||
return Column(
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [bar, SizedBox(height: 4), _buildFindInput(context, value)],
|
children: [bar, SizedBox(height: 4), _buildFindInput(context, value)],
|
||||||
);
|
);
|
||||||
@@ -393,45 +412,42 @@ class FindPanel extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
return bar;
|
return bar;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stack _buildFindInput(BuildContext context, CodeFindValue value) {
|
Widget _buildFindInput(BuildContext context, CodeFindValue value) {
|
||||||
return Stack(
|
return Row(
|
||||||
alignment: Alignment.center,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
_buildTextField(
|
Flexible(
|
||||||
|
child: _buildTextField(
|
||||||
|
context: context,
|
||||||
|
onSubmitted: () {
|
||||||
|
if (value.result == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
controller.nextMatch();
|
||||||
|
controller.findInputFocusNode.requestFocus();
|
||||||
|
},
|
||||||
|
controller: controller.findInputController,
|
||||||
|
focusNode: controller.findInputFocusNode,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_buildCheckText(
|
||||||
context: context,
|
context: context,
|
||||||
onSubmitted: () {
|
text: 'Aa',
|
||||||
if (value.result == null) {
|
isSelected: value.option.caseSensitive,
|
||||||
return;
|
onPressed: () {
|
||||||
}
|
controller.toggleCaseSensitive();
|
||||||
controller.nextMatch();
|
|
||||||
controller.findInputFocusNode.requestFocus();
|
|
||||||
},
|
},
|
||||||
controller: controller.findInputController,
|
|
||||||
focusNode: controller.findInputFocusNode,
|
|
||||||
),
|
),
|
||||||
Row(
|
_buildCheckText(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
context: context,
|
||||||
spacing: 8,
|
text: '.*',
|
||||||
children: [
|
isSelected: value.option.regex,
|
||||||
_buildCheckText(
|
onPressed: () {
|
||||||
context: context,
|
controller.toggleRegex();
|
||||||
text: 'Aa',
|
},
|
||||||
isSelected: value.option.caseSensitive,
|
|
||||||
onPressed: () {
|
|
||||||
controller.toggleCaseSensitive();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
_buildCheckText(
|
|
||||||
context: context,
|
|
||||||
text: '.*',
|
|
||||||
isSelected: value.option.regex,
|
|
||||||
onPressed: () {
|
|
||||||
controller.toggleRegex();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SizedBox(width: 4),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 4),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -442,18 +458,21 @@ class FindPanel extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
required FocusNode focusNode,
|
required FocusNode focusNode,
|
||||||
required VoidCallback onSubmitted,
|
required VoidCallback onSubmitted,
|
||||||
}) {
|
}) {
|
||||||
return TextField(
|
return SizedBox(
|
||||||
maxLines: 1,
|
height: globalState.measure.bodyMediumHeight + 8 * 2,
|
||||||
focusNode: focusNode,
|
child: TextField(
|
||||||
style: context.textTheme.bodyMedium,
|
maxLines: 1,
|
||||||
decoration: InputDecoration(
|
focusNode: focusNode,
|
||||||
border: OutlineInputBorder(),
|
style: context.textTheme.bodyMedium,
|
||||||
contentPadding: EdgeInsets.symmetric(horizontal: 12),
|
decoration: InputDecoration(
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
contentPadding: EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
),
|
||||||
|
onSubmitted: (_) {
|
||||||
|
onSubmitted();
|
||||||
|
},
|
||||||
|
controller: controller,
|
||||||
),
|
),
|
||||||
onSubmitted: (_) {
|
|
||||||
onSubmitted();
|
|
||||||
},
|
|
||||||
controller: controller,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,18 +503,16 @@ class FindPanel extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildIconButton({required IconData icon, VoidCallback? onPressed}) {
|
Widget _buildIconButton({required IconData icon, VoidCallback? onPressed}) {
|
||||||
return IconButton(
|
return IconButton(onPressed: onPressed, icon: Icon(icon, size: 16));
|
||||||
visualDensity: VisualDensity.compact,
|
|
||||||
onPressed: onPressed,
|
|
||||||
style: IconButton.styleFrom(padding: EdgeInsets.all(0)),
|
|
||||||
icon: Icon(icon, size: 16),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContextMenuControllerImpl implements SelectionToolbarController {
|
class ContextMenuControllerImpl implements SelectionToolbarController {
|
||||||
OverlayEntry? _overlayEntry;
|
OverlayEntry? _overlayEntry;
|
||||||
bool _isFirstRender = true;
|
bool _isFirstRender = true;
|
||||||
|
bool readOnly = false;
|
||||||
|
|
||||||
|
ContextMenuControllerImpl(this.readOnly);
|
||||||
|
|
||||||
void _removeOverLayEntry() {
|
void _removeOverLayEntry() {
|
||||||
_overlayEntry?.remove();
|
_overlayEntry?.remove();
|
||||||
@@ -532,11 +549,12 @@ class ContextMenuControllerImpl implements SelectionToolbarController {
|
|||||||
label: appLocalizations.copy,
|
label: appLocalizations.copy,
|
||||||
onPressed: controller.copy,
|
onPressed: controller.copy,
|
||||||
),
|
),
|
||||||
PopupMenuItemData(
|
if (!readOnly)
|
||||||
label: appLocalizations.paste,
|
PopupMenuItemData(
|
||||||
onPressed: controller.paste,
|
label: appLocalizations.paste,
|
||||||
),
|
onPressed: controller.paste,
|
||||||
if (isNotEmpty)
|
),
|
||||||
|
if (isNotEmpty && !readOnly)
|
||||||
PopupMenuItemData(
|
PopupMenuItemData(
|
||||||
label: appLocalizations.cut,
|
label: appLocalizations.cut,
|
||||||
onPressed: controller.cut,
|
onPressed: controller.cut,
|
||||||
@@ -552,6 +570,10 @@ class ContextMenuControllerImpl implements SelectionToolbarController {
|
|||||||
} else if (controller.selectedText.isEmpty) {
|
} else if (controller.selectedText.isEmpty) {
|
||||||
_removeOverLayEntry();
|
_removeOverLayEntry();
|
||||||
}
|
}
|
||||||
|
if (menus.isEmpty) {
|
||||||
|
_removeOverLayEntry();
|
||||||
|
return SizedBox();
|
||||||
|
}
|
||||||
return TextSelectionToolbar(
|
return TextSelectionToolbar(
|
||||||
anchorAbove: anchors.primaryAnchor,
|
anchorAbove: anchors.primaryAnchor,
|
||||||
anchorBelow: anchors.secondaryAnchor ?? Offset.zero,
|
anchorBelow: anchors.secondaryAnchor ?? Offset.zero,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:fl_clash/common/common.dart';
|
import 'package:fl_clash/common/common.dart';
|
||||||
import 'package:fl_clash/enum/enum.dart';
|
import 'package:fl_clash/enum/enum.dart';
|
||||||
import 'package:fl_clash/models/models.dart';
|
import 'package:fl_clash/models/models.dart';
|
||||||
@@ -290,11 +292,41 @@ class BackBlock extends _$BackBlock with AutoDisposeNotifierMixin {
|
|||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class Loading extends _$Loading with AutoDisposeNotifierMixin {
|
class Loading extends _$Loading with AutoDisposeNotifierMixin {
|
||||||
|
DateTime? _start;
|
||||||
|
Timer? _timer;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool build() {
|
bool build() {
|
||||||
return globalState.appState.loading;
|
return globalState.appState.loading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void start() {
|
||||||
|
_timer?.cancel();
|
||||||
|
_timer = null;
|
||||||
|
_start = DateTime.now();
|
||||||
|
value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> stop() async {
|
||||||
|
if (_start == null) {
|
||||||
|
value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final startedAt = _start!;
|
||||||
|
final elapsed = DateTime.now().difference(_start!).inMilliseconds;
|
||||||
|
const minDuration = 1000;
|
||||||
|
if (elapsed >= minDuration) {
|
||||||
|
value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_timer = Timer(Duration(milliseconds: minDuration - elapsed), () {
|
||||||
|
if (_start != startedAt) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
onUpdate(value) {
|
onUpdate(value) {
|
||||||
globalState.appState = globalState.appState.copyWith(loading: value);
|
globalState.appState = globalState.appState.copyWith(loading: value);
|
||||||
@@ -407,16 +439,63 @@ class _CoreStatus extends _$CoreStatus with AutoDisposeNotifierMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class QueryMap extends _$QueryMap with AutoDisposeNotifierMixin {
|
class Query extends _$Query with AutoDisposeNotifierMixin {
|
||||||
|
late final QueryTag _tag;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<QueryTag, String> build() => globalState.appState.queryMap;
|
String build(QueryTag tag) {
|
||||||
|
_tag = tag;
|
||||||
|
return globalState.appState.queryMap[tag] ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
onUpdate(value) {
|
onUpdate(value) {
|
||||||
globalState.appState = globalState.appState.copyWith(queryMap: value);
|
final newMap = Map<QueryTag, String>.from(globalState.appState.queryMap)
|
||||||
}
|
..[_tag] = value;
|
||||||
|
globalState.appState = globalState.appState.copyWith(queryMap: newMap);
|
||||||
void updateQuery(QueryTag tag, String value) {
|
}
|
||||||
this.value = Map.from(globalState.appState.queryMap)..[tag] = value;
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class SelectedItems extends _$SelectedItems with AutoDisposeNotifierMixin {
|
||||||
|
late final String _key;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Set<String> build(String key) {
|
||||||
|
_key = key;
|
||||||
|
return globalState.appState.selectedItemsMap[_key] ?? {};
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
onUpdate(value) {
|
||||||
|
final newMap = globalState.appState.selectedItemsMap.copyWitUpdate(
|
||||||
|
key,
|
||||||
|
value.isEmpty ? null : value,
|
||||||
|
);
|
||||||
|
globalState.appState = globalState.appState.copyWith(
|
||||||
|
selectedItemsMap: newMap,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class SelectedItem extends _$SelectedItem with AutoDisposeNotifierMixin {
|
||||||
|
late final String _key;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String build(String key) {
|
||||||
|
_key = key;
|
||||||
|
return globalState.appState.selectedItemMap[_key] ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
onUpdate(value) {
|
||||||
|
final newMap = globalState.appState.selectedItemMap.copyWitUpdate(
|
||||||
|
key,
|
||||||
|
value.isEmpty ? null : value,
|
||||||
|
);
|
||||||
|
globalState.appState = globalState.appState.copyWith(
|
||||||
|
selectedItemMap: newMap,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,10 +50,6 @@ class VpnSetting extends _$VpnSetting with AutoDisposeNotifierMixin {
|
|||||||
onUpdate(value) {
|
onUpdate(value) {
|
||||||
globalState.config = globalState.config.copyWith(vpnProps: value);
|
globalState.config = globalState.config.copyWith(vpnProps: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateState(VpnProps Function(VpnProps state) builder) {
|
|
||||||
value = builder(state);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
@@ -225,44 +221,52 @@ class ProxiesStyleSetting extends _$ProxiesStyleSetting
|
|||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class ScriptState extends _$ScriptState with AutoDisposeNotifierMixin {
|
class Scripts extends _$Scripts with AutoDisposeNotifierMixin {
|
||||||
@override
|
@override
|
||||||
ScriptProps build() {
|
List<Script> build() {
|
||||||
return globalState.config.scriptProps;
|
return globalState.config.scripts;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
onUpdate(value) {
|
onUpdate(value) {
|
||||||
globalState.config = globalState.config.copyWith(scriptProps: value);
|
globalState.config = globalState.config.copyWith(scripts: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setScript(Script script) {
|
void setScript(Script script) {
|
||||||
final list = List<Script>.from(state.scripts);
|
final list = List<Script>.from(state);
|
||||||
final index = list.indexWhere((item) => item.id == script.id);
|
final index = list.indexWhere((item) => item.id == script.id);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
list[index] = script;
|
list[index] = script;
|
||||||
} else {
|
} else {
|
||||||
list.add(script);
|
list.add(script);
|
||||||
}
|
}
|
||||||
value = state.copyWith(scripts: list);
|
value = list;
|
||||||
}
|
|
||||||
|
|
||||||
void setId(String id) {
|
|
||||||
value = state.copyWith(currentId: state.currentId != id ? id : null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void del(String id) {
|
void del(String id) {
|
||||||
final list = List<Script>.from(state.scripts);
|
final list = List<Script>.from(state);
|
||||||
final index = list.indexWhere((item) => item.label == id);
|
final index = list.indexWhere((item) => item.id == id);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
list.removeAt(index);
|
list.removeAt(index);
|
||||||
}
|
}
|
||||||
final nextId = id == state.currentId ? null : state.currentId;
|
state = list;
|
||||||
state = state.copyWith(scripts: list, currentId: nextId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isExits(String label) {
|
bool isExits(String label) {
|
||||||
return state.scripts.indexWhere((item) => item.label == label) != -1;
|
return state.indexWhere((item) => item.label == label) != -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class Rules extends _$Rules with AutoDisposeNotifierMixin {
|
||||||
|
@override
|
||||||
|
List<Rule> build() {
|
||||||
|
return globalState.config.rules;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
onUpdate(value) {
|
||||||
|
globalState.config = globalState.config.copyWith(rules: value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1097,7 +1097,7 @@ final class LoadingProvider extends $NotifierProvider<Loading, bool> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$loadingHash() => r'a0a09132a78495616785461cdc2a8b412c19b51b';
|
String _$loadingHash() => r'd3d9e6b203fecbef89d468b6ecf173a98a6a26a9';
|
||||||
|
|
||||||
abstract class _$Loading extends $Notifier<bool> {
|
abstract class _$Loading extends $Notifier<bool> {
|
||||||
bool build();
|
bool build();
|
||||||
@@ -1437,52 +1437,278 @@ abstract class _$CoreStatus extends $Notifier<CoreStatus> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProviderFor(QueryMap)
|
@ProviderFor(Query)
|
||||||
const queryMapProvider = QueryMapProvider._();
|
const queryProvider = QueryFamily._();
|
||||||
|
|
||||||
final class QueryMapProvider
|
final class QueryProvider extends $NotifierProvider<Query, String> {
|
||||||
extends $NotifierProvider<QueryMap, Map<QueryTag, String>> {
|
const QueryProvider._({
|
||||||
const QueryMapProvider._()
|
required QueryFamily super.from,
|
||||||
: super(
|
required QueryTag super.argument,
|
||||||
from: null,
|
}) : super(
|
||||||
argument: null,
|
retry: null,
|
||||||
retry: null,
|
name: r'queryProvider',
|
||||||
name: r'queryMapProvider',
|
isAutoDispose: true,
|
||||||
isAutoDispose: true,
|
dependencies: null,
|
||||||
dependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
);
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String debugGetCreateSourceHash() => _$queryMapHash();
|
String debugGetCreateSourceHash() => _$queryHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'queryProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
@$internal
|
@$internal
|
||||||
@override
|
@override
|
||||||
QueryMap create() => QueryMap();
|
Query create() => Query();
|
||||||
|
|
||||||
/// {@macro riverpod.override_with_value}
|
/// {@macro riverpod.override_with_value}
|
||||||
Override overrideWithValue(Map<QueryTag, String> value) {
|
Override overrideWithValue(String value) {
|
||||||
return $ProviderOverride(
|
return $ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
providerOverride: $SyncValueProvider<Map<QueryTag, String>>(value),
|
providerOverride: $SyncValueProvider<String>(value),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is QueryProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$queryMapHash() => r'f64a1bf5fcd4f85986d8ba3c956e397abc4f2d5d';
|
String _$queryHash() => r'da8d34ef86df1366e8607df2ef9155cc9473c959';
|
||||||
|
|
||||||
abstract class _$QueryMap extends $Notifier<Map<QueryTag, String>> {
|
final class QueryFamily extends $Family
|
||||||
Map<QueryTag, String> build();
|
with $ClassFamilyOverride<Query, String, String, String, QueryTag> {
|
||||||
|
const QueryFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'queryProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
QueryProvider call(QueryTag tag) =>
|
||||||
|
QueryProvider._(argument: tag, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'queryProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _$Query extends $Notifier<String> {
|
||||||
|
late final _$args = ref.$arg as QueryTag;
|
||||||
|
QueryTag get tag => _$args;
|
||||||
|
|
||||||
|
String build(QueryTag tag);
|
||||||
@$mustCallSuper
|
@$mustCallSuper
|
||||||
@override
|
@override
|
||||||
void runBuild() {
|
void runBuild() {
|
||||||
final created = build();
|
final created = build(_$args);
|
||||||
final ref = this.ref as $Ref<Map<QueryTag, String>, Map<QueryTag, String>>;
|
final ref = this.ref as $Ref<String, String>;
|
||||||
final element =
|
final element =
|
||||||
ref.element
|
ref.element
|
||||||
as $ClassProviderElement<
|
as $ClassProviderElement<
|
||||||
AnyNotifier<Map<QueryTag, String>, Map<QueryTag, String>>,
|
AnyNotifier<String, String>,
|
||||||
Map<QueryTag, String>,
|
String,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(SelectedItems)
|
||||||
|
const selectedItemsProvider = SelectedItemsFamily._();
|
||||||
|
|
||||||
|
final class SelectedItemsProvider
|
||||||
|
extends $NotifierProvider<SelectedItems, Set<String>> {
|
||||||
|
const SelectedItemsProvider._({
|
||||||
|
required SelectedItemsFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedItemsProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$selectedItemsHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'selectedItemsProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
SelectedItems create() => SelectedItems();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Set<String> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Set<String>>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is SelectedItemsProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$selectedItemsHash() => r'9a13ee78fdc100c8708af9de46e2861652d68e77';
|
||||||
|
|
||||||
|
final class SelectedItemsFamily extends $Family
|
||||||
|
with
|
||||||
|
$ClassFamilyOverride<
|
||||||
|
SelectedItems,
|
||||||
|
Set<String>,
|
||||||
|
Set<String>,
|
||||||
|
Set<String>,
|
||||||
|
String
|
||||||
|
> {
|
||||||
|
const SelectedItemsFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedItemsProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
SelectedItemsProvider call(String key) =>
|
||||||
|
SelectedItemsProvider._(argument: key, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'selectedItemsProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _$SelectedItems extends $Notifier<Set<String>> {
|
||||||
|
late final _$args = ref.$arg as String;
|
||||||
|
String get key => _$args;
|
||||||
|
|
||||||
|
Set<String> build(String key);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref = this.ref as $Ref<Set<String>, Set<String>>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<Set<String>, Set<String>>,
|
||||||
|
Set<String>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(SelectedItem)
|
||||||
|
const selectedItemProvider = SelectedItemFamily._();
|
||||||
|
|
||||||
|
final class SelectedItemProvider
|
||||||
|
extends $NotifierProvider<SelectedItem, String> {
|
||||||
|
const SelectedItemProvider._({
|
||||||
|
required SelectedItemFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedItemProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$selectedItemHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'selectedItemProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
SelectedItem create() => SelectedItem();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(String value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<String>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is SelectedItemProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$selectedItemHash() => r'374202f309d7a786190706fb0a2ac4945de94213';
|
||||||
|
|
||||||
|
final class SelectedItemFamily extends $Family
|
||||||
|
with $ClassFamilyOverride<SelectedItem, String, String, String, String> {
|
||||||
|
const SelectedItemFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'selectedItemProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
SelectedItemProvider call(String key) =>
|
||||||
|
SelectedItemProvider._(argument: key, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'selectedItemProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _$SelectedItem extends $Notifier<String> {
|
||||||
|
late final _$args = ref.$arg as String;
|
||||||
|
String get key => _$args;
|
||||||
|
|
||||||
|
String build(String key);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref = this.ref as $Ref<String, String>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<String, String>,
|
||||||
|
String,
|
||||||
Object?,
|
Object?,
|
||||||
Object?
|
Object?
|
||||||
>;
|
>;
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ final class VpnSettingProvider extends $NotifierProvider<VpnSetting, VpnProps> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$vpnSettingHash() => r'1dad4881ae7bcec76678585ac7b84f820b2ca92b';
|
String _$vpnSettingHash() => r'e6fab5a735fe518f9d4e5619254b0cea0006f318';
|
||||||
|
|
||||||
abstract class _$VpnSetting extends $Notifier<VpnProps> {
|
abstract class _$VpnSetting extends $Notifier<VpnProps> {
|
||||||
VpnProps build();
|
VpnProps build();
|
||||||
@@ -591,52 +591,103 @@ abstract class _$ProxiesStyleSetting extends $Notifier<ProxiesStyle> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProviderFor(ScriptState)
|
@ProviderFor(Scripts)
|
||||||
const scriptStateProvider = ScriptStateProvider._();
|
const scriptsProvider = ScriptsProvider._();
|
||||||
|
|
||||||
final class ScriptStateProvider
|
final class ScriptsProvider extends $NotifierProvider<Scripts, List<Script>> {
|
||||||
extends $NotifierProvider<ScriptState, ScriptProps> {
|
const ScriptsProvider._()
|
||||||
const ScriptStateProvider._()
|
|
||||||
: super(
|
: super(
|
||||||
from: null,
|
from: null,
|
||||||
argument: null,
|
argument: null,
|
||||||
retry: null,
|
retry: null,
|
||||||
name: r'scriptStateProvider',
|
name: r'scriptsProvider',
|
||||||
isAutoDispose: true,
|
isAutoDispose: true,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String debugGetCreateSourceHash() => _$scriptStateHash();
|
String debugGetCreateSourceHash() => _$scriptsHash();
|
||||||
|
|
||||||
@$internal
|
@$internal
|
||||||
@override
|
@override
|
||||||
ScriptState create() => ScriptState();
|
Scripts create() => Scripts();
|
||||||
|
|
||||||
/// {@macro riverpod.override_with_value}
|
/// {@macro riverpod.override_with_value}
|
||||||
Override overrideWithValue(ScriptProps value) {
|
Override overrideWithValue(List<Script> value) {
|
||||||
return $ProviderOverride(
|
return $ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
providerOverride: $SyncValueProvider<ScriptProps>(value),
|
providerOverride: $SyncValueProvider<List<Script>>(value),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$scriptStateHash() => r'4770c34c3d24451fef95e372450e4a333b419977';
|
String _$scriptsHash() => r'67dfdff76fc16b47c2300011afb5952a8857bad5';
|
||||||
|
|
||||||
abstract class _$ScriptState extends $Notifier<ScriptProps> {
|
abstract class _$Scripts extends $Notifier<List<Script>> {
|
||||||
ScriptProps build();
|
List<Script> build();
|
||||||
@$mustCallSuper
|
@$mustCallSuper
|
||||||
@override
|
@override
|
||||||
void runBuild() {
|
void runBuild() {
|
||||||
final created = build();
|
final created = build();
|
||||||
final ref = this.ref as $Ref<ScriptProps, ScriptProps>;
|
final ref = this.ref as $Ref<List<Script>, List<Script>>;
|
||||||
final element =
|
final element =
|
||||||
ref.element
|
ref.element
|
||||||
as $ClassProviderElement<
|
as $ClassProviderElement<
|
||||||
AnyNotifier<ScriptProps, ScriptProps>,
|
AnyNotifier<List<Script>, List<Script>>,
|
||||||
ScriptProps,
|
List<Script>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(Rules)
|
||||||
|
const rulesProvider = RulesProvider._();
|
||||||
|
|
||||||
|
final class RulesProvider extends $NotifierProvider<Rules, List<Rule>> {
|
||||||
|
const RulesProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'rulesProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$rulesHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
Rules create() => Rules();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(List<Rule> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<List<Rule>>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$rulesHash() => r'ca7fdb6c8b9c5071002ac950494ec7c20937aa1b';
|
||||||
|
|
||||||
|
abstract class _$Rules extends $Notifier<List<Rule>> {
|
||||||
|
List<Rule> build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build();
|
||||||
|
final ref = this.ref as $Ref<List<Rule>, List<Rule>>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<List<Rule>, List<Rule>>,
|
||||||
|
List<Rule>,
|
||||||
Object?,
|
Object?,
|
||||||
Object?
|
Object?
|
||||||
>;
|
>;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ final class ConfigStateProvider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$configStateHash() => r'1f4ea3cc8f6461ba734e7e0c5d7295bfa4fd5afb';
|
String _$configStateHash() => r'0eb72e2cf30d1d0de694d28a3ec3c7658e825e92';
|
||||||
|
|
||||||
@ProviderFor(currentGroupsState)
|
@ProviderFor(currentGroupsState)
|
||||||
const currentGroupsStateProvider = CurrentGroupsStateProvider._();
|
const currentGroupsStateProvider = CurrentGroupsStateProvider._();
|
||||||
@@ -90,7 +90,7 @@ final class CurrentGroupsStateProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
String _$currentGroupsStateHash() =>
|
String _$currentGroupsStateHash() =>
|
||||||
r'6222c006e1970e7435268d32903b9019cf1a4351';
|
r'dbf8f02606a31486c99d7b89d19914cd5a1fc496';
|
||||||
|
|
||||||
@ProviderFor(navigationItemsState)
|
@ProviderFor(navigationItemsState)
|
||||||
const navigationItemsStateProvider = NavigationItemsStateProvider._();
|
const navigationItemsStateProvider = NavigationItemsStateProvider._();
|
||||||
@@ -310,7 +310,48 @@ final class TrayStateProvider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$trayStateHash() => r'2237a7dbf8fd66a0618e3d9caf99667857e6fd4d';
|
String _$trayStateHash() => r'f5057cc600a13dfc3bc7a45de7452febd18b2293';
|
||||||
|
|
||||||
|
@ProviderFor(trayTitleState)
|
||||||
|
const trayTitleStateProvider = TrayTitleStateProvider._();
|
||||||
|
|
||||||
|
final class TrayTitleStateProvider
|
||||||
|
extends $FunctionalProvider<TrayTitleState, TrayTitleState, TrayTitleState>
|
||||||
|
with $Provider<TrayTitleState> {
|
||||||
|
const TrayTitleStateProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'trayTitleStateProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$trayTitleStateHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<TrayTitleState> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
TrayTitleState create(Ref ref) {
|
||||||
|
return trayTitleState(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(TrayTitleState value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<TrayTitleState>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$trayTitleStateHash() => r'5f868aaf70480b00bfdc2de18684ee646a93fd12';
|
||||||
|
|
||||||
@ProviderFor(vpnState)
|
@ProviderFor(vpnState)
|
||||||
const vpnStateProvider = VpnStateProvider._();
|
const vpnStateProvider = VpnStateProvider._();
|
||||||
@@ -678,7 +719,7 @@ final class FilterGroupsStateProvider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$filterGroupsStateHash() => r'c50aafbb50f98a66e21fc069d22031351d93a0ab';
|
String _$filterGroupsStateHash() => r'7de7a4603ca5ed7c39a00351af43144eb6c21404';
|
||||||
|
|
||||||
final class FilterGroupsStateFamily extends $Family
|
final class FilterGroupsStateFamily extends $Family
|
||||||
with $FunctionalFamilyOverride<GroupsState, String> {
|
with $FunctionalFamilyOverride<GroupsState, String> {
|
||||||
@@ -1320,8 +1361,13 @@ final class GetDelayFamily extends $Family
|
|||||||
const selectedMapProvider = SelectedMapProvider._();
|
const selectedMapProvider = SelectedMapProvider._();
|
||||||
|
|
||||||
final class SelectedMapProvider
|
final class SelectedMapProvider
|
||||||
extends $FunctionalProvider<SelectedMap, SelectedMap, SelectedMap>
|
extends
|
||||||
with $Provider<SelectedMap> {
|
$FunctionalProvider<
|
||||||
|
Map<String, String>,
|
||||||
|
Map<String, String>,
|
||||||
|
Map<String, String>
|
||||||
|
>
|
||||||
|
with $Provider<Map<String, String>> {
|
||||||
const SelectedMapProvider._()
|
const SelectedMapProvider._()
|
||||||
: super(
|
: super(
|
||||||
from: null,
|
from: null,
|
||||||
@@ -1338,24 +1384,25 @@ final class SelectedMapProvider
|
|||||||
|
|
||||||
@$internal
|
@$internal
|
||||||
@override
|
@override
|
||||||
$ProviderElement<SelectedMap> $createElement($ProviderPointer pointer) =>
|
$ProviderElement<Map<String, String>> $createElement(
|
||||||
$ProviderElement(pointer);
|
$ProviderPointer pointer,
|
||||||
|
) => $ProviderElement(pointer);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
SelectedMap create(Ref ref) {
|
Map<String, String> create(Ref ref) {
|
||||||
return selectedMap(ref);
|
return selectedMap(ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// {@macro riverpod.override_with_value}
|
/// {@macro riverpod.override_with_value}
|
||||||
Override overrideWithValue(SelectedMap value) {
|
Override overrideWithValue(Map<String, String> value) {
|
||||||
return $ProviderOverride(
|
return $ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
providerOverride: $SyncValueProvider<SelectedMap>(value),
|
providerOverride: $SyncValueProvider<Map<String, String>>(value),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$selectedMapHash() => r'0d7a3610d9005e74e1a88595d7e22897dc8240a5';
|
String _$selectedMapHash() => r'd4438d8d87d0c7ec7d9c5d02f577cdba6ba2a785';
|
||||||
|
|
||||||
@ProviderFor(unfoldSet)
|
@ProviderFor(unfoldSet)
|
||||||
const unfoldSetProvider = UnfoldSetProvider._();
|
const unfoldSetProvider = UnfoldSetProvider._();
|
||||||
@@ -2180,7 +2227,7 @@ final class NeedSetupProvider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$needSetupHash() => r'25352164c340a5fb02add21246062dd1287595fb';
|
String _$needSetupHash() => r'6ea0d2be3df2046bbfa4e6c5d751727f06e7a4b3';
|
||||||
|
|
||||||
@ProviderFor(currentBrightness)
|
@ProviderFor(currentBrightness)
|
||||||
const currentBrightnessProvider = CurrentBrightnessProvider._();
|
const currentBrightnessProvider = CurrentBrightnessProvider._();
|
||||||
@@ -2356,46 +2403,96 @@ final class AndroidStateProvider
|
|||||||
|
|
||||||
String _$androidStateHash() => r'9f527fbb00c7e0c177f023e77d2f23458543d72f';
|
String _$androidStateHash() => r'9f527fbb00c7e0c177f023e77d2f23458543d72f';
|
||||||
|
|
||||||
@ProviderFor(Query)
|
@ProviderFor(overlayTopOffset)
|
||||||
const queryProvider = QueryFamily._();
|
const overlayTopOffsetProvider = OverlayTopOffsetProvider._();
|
||||||
|
|
||||||
final class QueryProvider extends $NotifierProvider<Query, String> {
|
final class OverlayTopOffsetProvider
|
||||||
const QueryProvider._({
|
extends $FunctionalProvider<double, double, double>
|
||||||
required QueryFamily super.from,
|
with $Provider<double> {
|
||||||
required QueryTag super.argument,
|
const OverlayTopOffsetProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'overlayTopOffsetProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$overlayTopOffsetHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<double> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
double create(Ref ref) {
|
||||||
|
return overlayTopOffset(ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(double value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<double>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$overlayTopOffsetHash() => r'b2462f67acbd88b7a881dfe4c6353e68ba49961d';
|
||||||
|
|
||||||
|
@ProviderFor(profile)
|
||||||
|
const profileProvider = ProfileFamily._();
|
||||||
|
|
||||||
|
final class ProfileProvider
|
||||||
|
extends $FunctionalProvider<Profile?, Profile?, Profile?>
|
||||||
|
with $Provider<Profile?> {
|
||||||
|
const ProfileProvider._({
|
||||||
|
required ProfileFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
}) : super(
|
}) : super(
|
||||||
retry: null,
|
retry: null,
|
||||||
name: r'queryProvider',
|
name: r'profileProvider',
|
||||||
isAutoDispose: true,
|
isAutoDispose: true,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String debugGetCreateSourceHash() => _$queryHash();
|
String debugGetCreateSourceHash() => _$profileHash();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return r'queryProvider'
|
return r'profileProvider'
|
||||||
''
|
''
|
||||||
'($argument)';
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@$internal
|
@$internal
|
||||||
@override
|
@override
|
||||||
Query create() => Query();
|
$ProviderElement<Profile?> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Profile? create(Ref ref) {
|
||||||
|
final argument = this.argument as String;
|
||||||
|
return profile(ref, argument);
|
||||||
|
}
|
||||||
|
|
||||||
/// {@macro riverpod.override_with_value}
|
/// {@macro riverpod.override_with_value}
|
||||||
Override overrideWithValue(String value) {
|
Override overrideWithValue(Profile? value) {
|
||||||
return $ProviderOverride(
|
return $ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
providerOverride: $SyncValueProvider<String>(value),
|
providerOverride: $SyncValueProvider<Profile?>(value),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is QueryProvider && other.argument == argument;
|
return other is ProfileProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -2404,43 +2501,230 @@ final class QueryProvider extends $NotifierProvider<Query, String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$queryHash() => r'64c25c898d6d63f468d7e36fd591d390621c5624';
|
String _$profileHash() => r'6992b7e6f32b24f2a876e2a2cab24fcd8e39d30d';
|
||||||
|
|
||||||
final class QueryFamily extends $Family
|
final class ProfileFamily extends $Family
|
||||||
with $ClassFamilyOverride<Query, String, String, String, QueryTag> {
|
with $FunctionalFamilyOverride<Profile?, String> {
|
||||||
const QueryFamily._()
|
const ProfileFamily._()
|
||||||
: super(
|
: super(
|
||||||
retry: null,
|
retry: null,
|
||||||
name: r'queryProvider',
|
name: r'profileProvider',
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
$allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
isAutoDispose: true,
|
isAutoDispose: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
QueryProvider call(QueryTag id) => QueryProvider._(argument: id, from: this);
|
ProfileProvider call(String profileId) =>
|
||||||
|
ProfileProvider._(argument: profileId, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => r'queryProvider';
|
String toString() => r'profileProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _$Query extends $Notifier<String> {
|
@ProviderFor(profileOverwrite)
|
||||||
late final _$args = ref.$arg as QueryTag;
|
const profileOverwriteProvider = ProfileOverwriteFamily._();
|
||||||
QueryTag get id => _$args;
|
|
||||||
|
|
||||||
String build(QueryTag id);
|
final class ProfileOverwriteProvider
|
||||||
|
extends $FunctionalProvider<Overwrite?, Overwrite?, Overwrite?>
|
||||||
|
with $Provider<Overwrite?> {
|
||||||
|
const ProfileOverwriteProvider._({
|
||||||
|
required ProfileOverwriteFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'profileOverwriteProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$profileOverwriteHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'profileOverwriteProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<Overwrite?> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Overwrite? create(Ref ref) {
|
||||||
|
final argument = this.argument as String;
|
||||||
|
return profileOverwrite(ref, argument);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Overwrite? value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Overwrite?>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is ProfileOverwriteProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$profileOverwriteHash() => r'9d64c5546ff9236c7c9b0d6536bafdb57ffe40a5';
|
||||||
|
|
||||||
|
final class ProfileOverwriteFamily extends $Family
|
||||||
|
with $FunctionalFamilyOverride<Overwrite?, String> {
|
||||||
|
const ProfileOverwriteFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'profileOverwriteProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
ProfileOverwriteProvider call(String profileId) =>
|
||||||
|
ProfileOverwriteProvider._(argument: profileId, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'profileOverwriteProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(AccessControlState)
|
||||||
|
const accessControlStateProvider = AccessControlStateProvider._();
|
||||||
|
|
||||||
|
final class AccessControlStateProvider
|
||||||
|
extends $NotifierProvider<AccessControlState, AccessControl> {
|
||||||
|
const AccessControlStateProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'accessControlStateProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$accessControlStateHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
AccessControlState create() => AccessControlState();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(AccessControl value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<AccessControl>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$accessControlStateHash() =>
|
||||||
|
r'f7e23637439b8b6c80744d8fa83498edf15acc11';
|
||||||
|
|
||||||
|
abstract class _$AccessControlState extends $Notifier<AccessControl> {
|
||||||
|
AccessControl build();
|
||||||
@$mustCallSuper
|
@$mustCallSuper
|
||||||
@override
|
@override
|
||||||
void runBuild() {
|
void runBuild() {
|
||||||
final created = build(_$args);
|
final created = build();
|
||||||
final ref = this.ref as $Ref<String, String>;
|
final ref = this.ref as $Ref<AccessControl, AccessControl>;
|
||||||
final element =
|
final element =
|
||||||
ref.element
|
ref.element
|
||||||
as $ClassProviderElement<
|
as $ClassProviderElement<
|
||||||
AnyNotifier<String, String>,
|
AnyNotifier<AccessControl, AccessControl>,
|
||||||
String,
|
AccessControl,
|
||||||
Object?,
|
Object?,
|
||||||
Object?
|
Object?
|
||||||
>;
|
>;
|
||||||
element.handleValue(ref, created);
|
element.handleValue(ref, created);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ProviderFor(setupState)
|
||||||
|
const setupStateProvider = SetupStateFamily._();
|
||||||
|
|
||||||
|
final class SetupStateProvider
|
||||||
|
extends $FunctionalProvider<SetupState, SetupState, SetupState>
|
||||||
|
with $Provider<SetupState> {
|
||||||
|
const SetupStateProvider._({
|
||||||
|
required SetupStateFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'setupStateProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$setupStateHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'setupStateProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$ProviderElement<SetupState> $createElement($ProviderPointer pointer) =>
|
||||||
|
$ProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
SetupState create(Ref ref) {
|
||||||
|
final argument = this.argument as String;
|
||||||
|
return setupState(ref, argument);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(SetupState value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<SetupState>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is SetupStateProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$setupStateHash() => r'f4a7cd47c996bb6de04ee84716d59feca6bb7bc9';
|
||||||
|
|
||||||
|
final class SetupStateFamily extends $Family
|
||||||
|
with $FunctionalFamilyOverride<SetupState, String> {
|
||||||
|
const SetupStateFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'setupStateProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
SetupStateProvider call(String profileId) =>
|
||||||
|
SetupStateProvider._(argument: profileId, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'setupStateProvider';
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,15 +23,15 @@ Config configState(Ref ref) {
|
|||||||
final networkProps = ref.watch(networkSettingProvider);
|
final networkProps = ref.watch(networkSettingProvider);
|
||||||
final vpnProps = ref.watch(vpnSettingProvider);
|
final vpnProps = ref.watch(vpnSettingProvider);
|
||||||
final proxiesStyle = ref.watch(proxiesStyleSettingProvider);
|
final proxiesStyle = ref.watch(proxiesStyleSettingProvider);
|
||||||
final scriptProps = ref.watch(scriptStateProvider);
|
final scripts = ref.watch(scriptsProvider);
|
||||||
final hotKeyActions = ref.watch(hotKeyActionsProvider);
|
final hotKeyActions = ref.watch(hotKeyActionsProvider);
|
||||||
final dav = ref.watch(appDAVSettingProvider);
|
final dav = ref.watch(appDAVSettingProvider);
|
||||||
final windowProps = ref.watch(windowSettingProvider);
|
final windowProps = ref.watch(windowSettingProvider);
|
||||||
|
final rules = ref.watch(rulesProvider);
|
||||||
return Config(
|
return Config(
|
||||||
dav: dav,
|
dav: dav,
|
||||||
windowProps: windowProps,
|
windowProps: windowProps,
|
||||||
hotKeyActions: hotKeyActions,
|
hotKeyActions: hotKeyActions,
|
||||||
scriptProps: scriptProps,
|
|
||||||
proxiesStyle: proxiesStyle,
|
proxiesStyle: proxiesStyle,
|
||||||
vpnProps: vpnProps,
|
vpnProps: vpnProps,
|
||||||
networkProps: networkProps,
|
networkProps: networkProps,
|
||||||
@@ -41,6 +41,8 @@ Config configState(Ref ref) {
|
|||||||
appSetting: appSetting,
|
appSetting: appSetting,
|
||||||
themeProps: themeProps,
|
themeProps: themeProps,
|
||||||
patchClashConfig: patchClashConfig,
|
patchClashConfig: patchClashConfig,
|
||||||
|
scripts: scripts,
|
||||||
|
rules: rules,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +51,16 @@ GroupsState currentGroupsState(Ref ref) {
|
|||||||
final mode = ref.watch(
|
final mode = ref.watch(
|
||||||
patchClashConfigProvider.select((state) => state.mode),
|
patchClashConfigProvider.select((state) => state.mode),
|
||||||
);
|
);
|
||||||
final groups = ref.watch(groupsProvider);
|
final groups = ref.watch(
|
||||||
|
groupsProvider.select(
|
||||||
|
(state) => state.map((item) {
|
||||||
|
return item.copyWith(
|
||||||
|
now: '',
|
||||||
|
all: item.all.map((proxy) => proxy.copyWith(now: '')).toList(),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
return GroupsState(
|
return GroupsState(
|
||||||
value: switch (mode) {
|
value: switch (mode) {
|
||||||
Mode.direct => [],
|
Mode.direct => [],
|
||||||
@@ -141,35 +152,56 @@ ProxyState proxyState(Ref ref) {
|
|||||||
@riverpod
|
@riverpod
|
||||||
TrayState trayState(Ref ref) {
|
TrayState trayState(Ref ref) {
|
||||||
final isStart = ref.watch(runTimeProvider.select((state) => state != null));
|
final isStart = ref.watch(runTimeProvider.select((state) => state != null));
|
||||||
final networkProps = ref.watch(networkSettingProvider);
|
final systemProxy = ref.watch(
|
||||||
final clashConfig = ref.watch(patchClashConfigProvider);
|
networkSettingProvider.select((state) => state.systemProxy),
|
||||||
final appSetting = ref.watch(appSettingProvider);
|
);
|
||||||
|
final clashConfigVm3 = ref.watch(
|
||||||
|
patchClashConfigProvider.select(
|
||||||
|
(state) => VM3(a: state.mode, b: state.mixedPort, c: state.tun.enable),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
final appSettingVm3 = ref.watch(
|
||||||
|
appSettingProvider.select(
|
||||||
|
(state) =>
|
||||||
|
VM3(a: state.autoLaunch, b: state.locale, c: state.showTrayTitle),
|
||||||
|
),
|
||||||
|
);
|
||||||
final groups = ref.watch(currentGroupsStateProvider).value;
|
final groups = ref.watch(currentGroupsStateProvider).value;
|
||||||
final brightness = ref.watch(systemBrightnessProvider);
|
final brightness = ref.watch(systemBrightnessProvider);
|
||||||
|
|
||||||
final selectedMap = ref.watch(selectedMapProvider);
|
final selectedMap = ref.watch(selectedMapProvider);
|
||||||
|
|
||||||
return TrayState(
|
return TrayState(
|
||||||
mode: clashConfig.mode,
|
mode: clashConfigVm3.a,
|
||||||
port: clashConfig.mixedPort,
|
port: clashConfigVm3.b,
|
||||||
autoLaunch: appSetting.autoLaunch,
|
autoLaunch: appSettingVm3.a,
|
||||||
systemProxy: networkProps.systemProxy,
|
systemProxy: systemProxy,
|
||||||
tunEnable: clashConfig.tun.enable,
|
tunEnable: clashConfigVm3.c,
|
||||||
isStart: isStart,
|
isStart: isStart,
|
||||||
locale: appSetting.locale,
|
locale: appSettingVm3.b,
|
||||||
brightness: brightness,
|
brightness: brightness,
|
||||||
groups: groups,
|
groups: groups,
|
||||||
selectedMap: selectedMap,
|
selectedMap: selectedMap,
|
||||||
|
showTrayTitle: appSettingVm3.c,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
TrayTitleState trayTitleState(Ref ref) {
|
||||||
|
final showTrayTitle = ref.watch(
|
||||||
|
appSettingProvider.select((state) => state.showTrayTitle),
|
||||||
|
);
|
||||||
|
final traffic = ref.watch(
|
||||||
|
trafficsProvider.select((state) => state.list.safeLast(Traffic())),
|
||||||
|
);
|
||||||
|
return TrayTitleState(showTrayTitle: showTrayTitle, traffic: traffic);
|
||||||
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
VpnState vpnState(Ref ref) {
|
VpnState vpnState(Ref ref) {
|
||||||
final vpnProps = ref.watch(vpnSettingProvider);
|
final vpnProps = ref.watch(vpnSettingProvider);
|
||||||
final stack = ref.watch(
|
final stack = ref.watch(
|
||||||
patchClashConfigProvider.select((state) => state.tun.stack),
|
patchClashConfigProvider.select((state) => state.tun.stack),
|
||||||
);
|
);
|
||||||
|
|
||||||
return VpnState(stack: stack, vpnProps: vpnProps);
|
return VpnState(stack: stack, vpnProps: vpnProps);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +299,7 @@ GroupsState filterGroupsState(Ref ref, String query) {
|
|||||||
})
|
})
|
||||||
.where((group) => group.all.isNotEmpty)
|
.where((group) => group.all.isNotEmpty)
|
||||||
.toList();
|
.toList();
|
||||||
return GroupsState(value: groups);
|
return currentGroups.copyWith(value: groups);
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
@@ -425,7 +457,7 @@ int? getDelay(Ref ref, {required String proxyName, String? testUrl}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
SelectedMap selectedMap(Ref ref) {
|
Map<String, String> selectedMap(Ref ref) {
|
||||||
final selectedMap = ref.watch(
|
final selectedMap = ref.watch(
|
||||||
currentProfileProvider.select((state) => state?.selectedMap ?? {}),
|
currentProfileProvider.select((state) => state?.selectedMap ?? {}),
|
||||||
);
|
);
|
||||||
@@ -575,9 +607,9 @@ ColorScheme genColorScheme(
|
|||||||
@riverpod
|
@riverpod
|
||||||
VM4<String?, String?, Dns?, bool> needSetup(Ref ref) {
|
VM4<String?, String?, Dns?, bool> needSetup(Ref ref) {
|
||||||
final profileId = ref.watch(currentProfileIdProvider);
|
final profileId = ref.watch(currentProfileIdProvider);
|
||||||
final content = ref.watch(
|
// final content = ref.watch(
|
||||||
scriptStateProvider.select((state) => state.currentScript?.content),
|
// scriptsProvider.select((state) => state.currentScript?.content),
|
||||||
);
|
// );
|
||||||
final overrideDns = ref.watch(overrideDnsProvider);
|
final overrideDns = ref.watch(overrideDnsProvider);
|
||||||
final dns = overrideDns == true
|
final dns = overrideDns == true
|
||||||
? ref.watch(patchClashConfigProvider.select((state) => state.dns))
|
? ref.watch(patchClashConfigProvider.select((state) => state.dns))
|
||||||
@@ -585,7 +617,7 @@ VM4<String?, String?, Dns?, bool> needSetup(Ref ref) {
|
|||||||
final appendSystemDns = ref.watch(
|
final appendSystemDns = ref.watch(
|
||||||
networkSettingProvider.select((state) => state.appendSystemDns),
|
networkSettingProvider.select((state) => state.appendSystemDns),
|
||||||
);
|
);
|
||||||
return VM4(profileId, content, dns, appendSystemDns);
|
return VM4(profileId, '', dns, appendSystemDns);
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
@@ -644,8 +676,49 @@ AndroidState androidState(Ref ref) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class Query extends _$Query {
|
double overlayTopOffset(Ref ref) {
|
||||||
@override
|
final isMobileView = ref.watch(isMobileViewProvider);
|
||||||
String build(QueryTag id) =>
|
final version = ref.watch(versionProvider);
|
||||||
ref.watch(queryMapProvider.select((state) => state[id] ?? ''));
|
ref.watch(viewSizeProvider);
|
||||||
|
double top = kHeaderHeight;
|
||||||
|
if ((version <= 10 || !isMobileView) && system.isMacOS || !system.isDesktop) {
|
||||||
|
top = 0;
|
||||||
|
}
|
||||||
|
return kToolbarHeight + top;
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
Profile? profile(Ref ref, String profileId) {
|
||||||
|
return ref.watch(
|
||||||
|
profilesProvider.select((state) => state.getProfile(profileId)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
Overwrite? profileOverwrite(Ref ref, String profileId) {
|
||||||
|
return ref.watch(
|
||||||
|
profileProvider(profileId).select((state) => state?.overwrite),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class AccessControlState extends _$AccessControlState
|
||||||
|
with AutoDisposeNotifierMixin {
|
||||||
|
@override
|
||||||
|
AccessControl build() => AccessControl();
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
SetupState setupState(Ref ref, String profileId) {
|
||||||
|
ref.watch(
|
||||||
|
profileProvider(profileId).select(
|
||||||
|
(state) =>
|
||||||
|
VM3(a: state?.id, b: state?.lastUpdateDate, c: state?.overwrite),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
ref.watch(patchClashConfigProvider.select((state) => state.dns));
|
||||||
|
ref.watch(overrideDnsProvider);
|
||||||
|
ref.watch(scriptsProvider);
|
||||||
|
ref.watch(rulesProvider);
|
||||||
|
return globalState.getSetupState(profileId);
|
||||||
}
|
}
|
||||||
|
|||||||
485
lib/state.dart
@@ -1,6 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:ffi' show Pointer;
|
import 'dart:ffi' as ffi;
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:isolate';
|
import 'dart:isolate';
|
||||||
|
|
||||||
@@ -49,6 +49,8 @@ class GlobalState {
|
|||||||
bool isInit = false;
|
bool isInit = false;
|
||||||
bool isUserDisconnected = false;
|
bool isUserDisconnected = false;
|
||||||
bool isService = false;
|
bool isService = false;
|
||||||
|
SetupState? lastSetupState;
|
||||||
|
VpnState? lastVpnState;
|
||||||
|
|
||||||
bool get isStart => startTime != null && startTime!.isBeforeNow;
|
bool get isStart => startTime != null && startTime!.isBeforeNow;
|
||||||
|
|
||||||
@@ -89,7 +91,7 @@ class GlobalState {
|
|||||||
final profileIds = config.profiles.map((item) => item.id);
|
final profileIds = config.profiles.map((item) => item.id);
|
||||||
final providersRootPath = await appPath.getProvidersRootPath();
|
final providersRootPath = await appPath.getProvidersRootPath();
|
||||||
final profilesRootPath = await appPath.profilesPath;
|
final profilesRootPath = await appPath.profilesPath;
|
||||||
Isolate.run(() async {
|
final entities = await Isolate.run<List<FileSystemEntity>>(() async {
|
||||||
final profilesDir = Directory(profilesRootPath);
|
final profilesDir = Directory(profilesRootPath);
|
||||||
final providersDir = Directory(providersRootPath);
|
final providersDir = Directory(providersRootPath);
|
||||||
final List<FileSystemEntity> entities = [];
|
final List<FileSystemEntity> entities = [];
|
||||||
@@ -103,17 +105,18 @@ class GlobalState {
|
|||||||
if (await providersDir.exists()) {
|
if (await providersDir.exists()) {
|
||||||
entities.addAll(providersDir.listSync());
|
entities.addAll(providersDir.listSync());
|
||||||
}
|
}
|
||||||
final deleteFutures = entities.map((entity) async {
|
return entities;
|
||||||
if (!profileIds.contains(basenameWithoutExtension(entity.path))) {
|
|
||||||
final res = await coreController.deleteFile(entity.path);
|
|
||||||
if (res.isNotEmpty) {
|
|
||||||
throw res;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
await Future.wait(deleteFutures);
|
|
||||||
});
|
});
|
||||||
|
final deleteFutures = entities.map((entity) async {
|
||||||
|
if (!profileIds.contains(basenameWithoutExtension(entity.path))) {
|
||||||
|
final res = await coreController.deleteFile(entity.path);
|
||||||
|
if (res.isNotEmpty) {
|
||||||
|
throw res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
await Future.wait(deleteFutures);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initDynamicColor() async {
|
Future<void> _initDynamicColor() async {
|
||||||
@@ -188,6 +191,7 @@ class GlobalState {
|
|||||||
BuildContext? context,
|
BuildContext? context,
|
||||||
String? title,
|
String? title,
|
||||||
String? confirmText,
|
String? confirmText,
|
||||||
|
String? cancelText,
|
||||||
bool cancelable = true,
|
bool cancelable = true,
|
||||||
bool? dismissible,
|
bool? dismissible,
|
||||||
}) async {
|
}) async {
|
||||||
@@ -204,7 +208,7 @@ class GlobalState {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).pop(false);
|
Navigator.of(context).pop(false);
|
||||||
},
|
},
|
||||||
child: Text(appLocalizations.cancel),
|
child: Text(cancelText ?? appLocalizations.cancel),
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -253,6 +257,7 @@ class GlobalState {
|
|||||||
required Widget child,
|
required Widget child,
|
||||||
BuildContext? context,
|
BuildContext? context,
|
||||||
bool? dismissible,
|
bool? dismissible,
|
||||||
|
bool filter = true,
|
||||||
}) async {
|
}) async {
|
||||||
return await showModal<T>(
|
return await showModal<T>(
|
||||||
useRootNavigator: false,
|
useRootNavigator: false,
|
||||||
@@ -262,15 +267,15 @@ class GlobalState {
|
|||||||
barrierDismissible: dismissible ?? true,
|
barrierDismissible: dismissible ?? true,
|
||||||
),
|
),
|
||||||
builder: (_) => child,
|
builder: (_) => child,
|
||||||
filter: commonFilter,
|
filter: filter ? commonFilter : null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showNotifier(String text) {
|
void showNotifier(String text, {MessageActionState? actionState}) {
|
||||||
if (text.isEmpty) {
|
if (text.isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
navigatorKey.currentContext?.showNotifier(text);
|
navigatorKey.currentContext?.showNotifier(text, actionState: actionState);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> openUrl(String url) async {
|
Future<void> openUrl(String url) async {
|
||||||
@@ -302,31 +307,19 @@ class GlobalState {
|
|||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> genConfigFile(ClashConfig pathConfig) async {
|
Future<Map> getConfigMap(String profileId) async {
|
||||||
final configFilePath = await appPath.configFilePath;
|
var res = {};
|
||||||
var config = {};
|
|
||||||
try {
|
try {
|
||||||
config = await patchRawConfig(patchConfig: pathConfig);
|
final setupState = globalState.getSetupState(profileId);
|
||||||
|
res = await makeRealConfig(
|
||||||
|
setupState: setupState,
|
||||||
|
patchConfig: config.patchClashConfig,
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
globalState.showNotifier(e.toString());
|
globalState.showNotifier(e.toString());
|
||||||
config = {};
|
res = {};
|
||||||
}
|
|
||||||
final res = await Isolate.run<String>(() async {
|
|
||||||
try {
|
|
||||||
final res = json.encode(config);
|
|
||||||
final file = File(configFilePath);
|
|
||||||
if (!await file.exists()) {
|
|
||||||
await file.create(recursive: true);
|
|
||||||
}
|
|
||||||
await file.writeAsString(res);
|
|
||||||
return '';
|
|
||||||
} catch (e) {
|
|
||||||
return e.toString();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (res.isNotEmpty) {
|
|
||||||
throw res;
|
|
||||||
}
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> genValidateFile(String path, String data) async {
|
Future<void> genValidateFile(String path, String data) async {
|
||||||
@@ -374,144 +367,286 @@ class GlobalState {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Map<String, dynamic>> patchRawConfig({
|
String getSelectedProxyName(String groupName) {
|
||||||
|
final group = appState.groups.getGroup(groupName);
|
||||||
|
final proxyName = config.currentProfile?.selectedMap[groupName];
|
||||||
|
return group?.getCurrentSelectedName(proxyName ?? '') ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> setupConfig({
|
||||||
|
required SetupState setupState,
|
||||||
|
required ClashConfig patchConfig,
|
||||||
|
VoidCallback? preloadInvoke,
|
||||||
|
}) async {
|
||||||
|
final config = await makeRealConfig(
|
||||||
|
setupState: setupState,
|
||||||
|
patchConfig: patchConfig,
|
||||||
|
);
|
||||||
|
final configFilePath = await appPath.configFilePath;
|
||||||
|
final res = await Isolate.run<String>(() async {
|
||||||
|
try {
|
||||||
|
final res = yaml.encode(config);
|
||||||
|
final file = File(configFilePath);
|
||||||
|
if (!await file.exists()) {
|
||||||
|
await file.create(recursive: true);
|
||||||
|
}
|
||||||
|
await file.writeAsString(res);
|
||||||
|
return '';
|
||||||
|
} catch (e) {
|
||||||
|
return e.toString();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (res.isNotEmpty) {
|
||||||
|
throw res;
|
||||||
|
}
|
||||||
|
final params = await globalState.getSetupParams();
|
||||||
|
return await coreController.setupConfig(
|
||||||
|
params: params,
|
||||||
|
setupState: setupState,
|
||||||
|
preloadInvoke: preloadInvoke,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<Map<String, dynamic>> makeRealConfig({
|
||||||
|
required SetupState setupState,
|
||||||
required ClashConfig patchConfig,
|
required ClashConfig patchConfig,
|
||||||
}) async {
|
}) async {
|
||||||
final profile = config.currentProfile;
|
final profileId = setupState.profileId;
|
||||||
if (profile == null) {
|
if (profileId?.isNotEmpty != true) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
final profileId = profile.id;
|
final configMap = await getProfileConfig(profileId!);
|
||||||
final configMap = await getProfileConfig(profileId);
|
String? scriptContent;
|
||||||
final rawConfig = await handleEvaluate(configMap);
|
final List<Rule> addedRules = [];
|
||||||
|
if (setupState.overwriteType == OverwriteType.script) {
|
||||||
|
scriptContent = setupState.scriptContent;
|
||||||
|
} else {
|
||||||
|
addedRules.addAll(setupState.addedRules);
|
||||||
|
}
|
||||||
|
final defaultUA = packageInfo.ua;
|
||||||
|
final appendSystemDns = config.networkProps.appendSystemDns;
|
||||||
final realPatchConfig = patchConfig.copyWith(
|
final realPatchConfig = patchConfig.copyWith(
|
||||||
tun: patchConfig.tun.getRealTun(config.networkProps.routeMode),
|
tun: patchConfig.tun.getRealTun(config.networkProps.routeMode),
|
||||||
);
|
);
|
||||||
rawConfig['external-controller'] = realPatchConfig.externalController.value;
|
|
||||||
rawConfig['external-ui'] = '';
|
|
||||||
rawConfig['interface-name'] = '';
|
|
||||||
rawConfig['external-ui-url'] = '';
|
|
||||||
rawConfig['tcp-concurrent'] = realPatchConfig.tcpConcurrent;
|
|
||||||
rawConfig['unified-delay'] = realPatchConfig.unifiedDelay;
|
|
||||||
rawConfig['ipv6'] = realPatchConfig.ipv6;
|
|
||||||
rawConfig['log-level'] = realPatchConfig.logLevel.name;
|
|
||||||
rawConfig['port'] = 0;
|
|
||||||
rawConfig['socks-port'] = 0;
|
|
||||||
rawConfig['keep-alive-interval'] = realPatchConfig.keepAliveInterval;
|
|
||||||
rawConfig['mixed-port'] = realPatchConfig.mixedPort;
|
|
||||||
rawConfig['port'] = realPatchConfig.port;
|
|
||||||
rawConfig['socks-port'] = realPatchConfig.socksPort;
|
|
||||||
rawConfig['redir-port'] = realPatchConfig.redirPort;
|
|
||||||
rawConfig['tproxy-port'] = realPatchConfig.tproxyPort;
|
|
||||||
rawConfig['find-process-mode'] = realPatchConfig.findProcessMode.name;
|
|
||||||
rawConfig['allow-lan'] = realPatchConfig.allowLan;
|
|
||||||
rawConfig['mode'] = realPatchConfig.mode.name;
|
|
||||||
if (rawConfig['tun'] == null) {
|
|
||||||
rawConfig['tun'] = {};
|
|
||||||
}
|
|
||||||
rawConfig['tun']['enable'] = realPatchConfig.tun.enable;
|
|
||||||
rawConfig['tun']['device'] = realPatchConfig.tun.device;
|
|
||||||
rawConfig['tun']['dns-hijack'] = realPatchConfig.tun.dnsHijack;
|
|
||||||
rawConfig['tun']['stack'] = realPatchConfig.tun.stack.name;
|
|
||||||
rawConfig['tun']['route-address'] = realPatchConfig.tun.routeAddress;
|
|
||||||
rawConfig['tun']['auto-route'] = realPatchConfig.tun.autoRoute;
|
|
||||||
rawConfig['geodata-loader'] = realPatchConfig.geodataLoader.name;
|
|
||||||
if (rawConfig['sniffer']?['sniff'] != null) {
|
|
||||||
for (final value in (rawConfig['sniffer']?['sniff'] as Map).values) {
|
|
||||||
if (value['ports'] != null && value['ports'] is List) {
|
|
||||||
value['ports'] =
|
|
||||||
value['ports']?.map((item) => item.toString()).toList() ?? [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (rawConfig['profile'] == null) {
|
|
||||||
rawConfig['profile'] = {};
|
|
||||||
}
|
|
||||||
if (rawConfig['proxy-providers'] != null) {
|
|
||||||
final proxyProviders = rawConfig['proxy-providers'] as Map;
|
|
||||||
for (final key in proxyProviders.keys) {
|
|
||||||
final proxyProvider = proxyProviders[key];
|
|
||||||
if (proxyProvider['type'] != 'http') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (proxyProvider['url'] != null) {
|
|
||||||
proxyProvider['path'] = await appPath.getProvidersFilePath(
|
|
||||||
profile.id,
|
|
||||||
'proxies',
|
|
||||||
proxyProvider['url'],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rawConfig['rule-providers'] != null) {
|
|
||||||
final ruleProviders = rawConfig['rule-providers'] as Map;
|
|
||||||
for (final key in ruleProviders.keys) {
|
|
||||||
final ruleProvider = ruleProviders[key];
|
|
||||||
if (ruleProvider['type'] != 'http') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (ruleProvider['url'] != null) {
|
|
||||||
ruleProvider['path'] = await appPath.getProvidersFilePath(
|
|
||||||
profile.id,
|
|
||||||
'rules',
|
|
||||||
ruleProvider['url'],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rawConfig['profile']['store-selected'] = false;
|
|
||||||
rawConfig['geox-url'] = realPatchConfig.geoXUrl.toJson();
|
|
||||||
rawConfig['global-ua'] = realPatchConfig.globalUa;
|
|
||||||
if (rawConfig['hosts'] == null) {
|
|
||||||
rawConfig['hosts'] = {};
|
|
||||||
}
|
|
||||||
for (final host in realPatchConfig.hosts.entries) {
|
|
||||||
rawConfig['hosts'][host.key] = host.value.splitByMultipleSeparators;
|
|
||||||
}
|
|
||||||
if (rawConfig['dns'] == null) {
|
|
||||||
rawConfig['dns'] = {};
|
|
||||||
}
|
|
||||||
final isEnableDns = rawConfig['dns']['enable'] == true;
|
|
||||||
final overrideDns = globalState.config.overrideDns;
|
final overrideDns = globalState.config.overrideDns;
|
||||||
final systemDns = 'system://';
|
Map<String, dynamic> rawConfig = configMap;
|
||||||
if (overrideDns || !isEnableDns) {
|
if (scriptContent?.isNotEmpty == true) {
|
||||||
final dns = switch (!isEnableDns) {
|
rawConfig = await handleEvaluate(scriptContent!, rawConfig);
|
||||||
true => realPatchConfig.dns.copyWith(
|
|
||||||
nameserver: [...realPatchConfig.dns.nameserver, systemDns],
|
|
||||||
),
|
|
||||||
false => realPatchConfig.dns,
|
|
||||||
};
|
|
||||||
rawConfig['dns'] = dns.toJson();
|
|
||||||
rawConfig['dns']['nameserver-policy'] = {};
|
|
||||||
for (final entry in dns.nameserverPolicy.entries) {
|
|
||||||
rawConfig['dns']['nameserver-policy'][entry.key] =
|
|
||||||
entry.value.splitByMultipleSeparators;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (config.networkProps.appendSystemDns) {
|
final directory = await appPath.profilesPath;
|
||||||
final List<dynamic> nameserver = rawConfig['dns']['nameserver'] ?? [];
|
String getProvidersFilePathInner(String type, String url) {
|
||||||
if (!nameserver.contains(systemDns)) {
|
return join(directory, 'providers', profileId, type, url.toMd5());
|
||||||
rawConfig['dns']['nameserver'] = [...nameserver, systemDns];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
List rules = [];
|
|
||||||
if (rawConfig['rules'] != null) {
|
|
||||||
rules = rawConfig['rules'];
|
|
||||||
}
|
|
||||||
rawConfig.remove('rules');
|
|
||||||
|
|
||||||
final overrideData = profile.overrideData;
|
final res = await Isolate.run<Map<String, dynamic>>(() async {
|
||||||
if (overrideData.enable && config.scriptProps.currentScript == null) {
|
rawConfig['external-controller'] =
|
||||||
if (overrideData.rule.type == OverrideRuleType.override) {
|
realPatchConfig.externalController.value;
|
||||||
rules = overrideData.runningRule;
|
rawConfig['external-ui'] = '';
|
||||||
} else {
|
rawConfig['interface-name'] = '';
|
||||||
rules = [...overrideData.runningRule, ...rules];
|
rawConfig['external-ui-url'] = '';
|
||||||
|
rawConfig['tcp-concurrent'] = realPatchConfig.tcpConcurrent;
|
||||||
|
rawConfig['unified-delay'] = realPatchConfig.unifiedDelay;
|
||||||
|
rawConfig['ipv6'] = realPatchConfig.ipv6;
|
||||||
|
rawConfig['log-level'] = realPatchConfig.logLevel.name;
|
||||||
|
rawConfig['port'] = 0;
|
||||||
|
rawConfig['socks-port'] = 0;
|
||||||
|
rawConfig['keep-alive-interval'] = realPatchConfig.keepAliveInterval;
|
||||||
|
rawConfig['mixed-port'] = realPatchConfig.mixedPort;
|
||||||
|
rawConfig['port'] = realPatchConfig.port;
|
||||||
|
rawConfig['socks-port'] = realPatchConfig.socksPort;
|
||||||
|
rawConfig['redir-port'] = realPatchConfig.redirPort;
|
||||||
|
rawConfig['tproxy-port'] = realPatchConfig.tproxyPort;
|
||||||
|
rawConfig['find-process-mode'] = realPatchConfig.findProcessMode.name;
|
||||||
|
rawConfig['allow-lan'] = realPatchConfig.allowLan;
|
||||||
|
rawConfig['mode'] = realPatchConfig.mode.name;
|
||||||
|
if (rawConfig['tun'] == null) {
|
||||||
|
rawConfig['tun'] = {};
|
||||||
}
|
}
|
||||||
|
rawConfig['tun']['enable'] = realPatchConfig.tun.enable;
|
||||||
|
rawConfig['tun']['device'] = realPatchConfig.tun.device;
|
||||||
|
rawConfig['tun']['dns-hijack'] = realPatchConfig.tun.dnsHijack;
|
||||||
|
rawConfig['tun']['stack'] = realPatchConfig.tun.stack.name;
|
||||||
|
rawConfig['tun']['route-address'] = realPatchConfig.tun.routeAddress;
|
||||||
|
rawConfig['tun']['auto-route'] = realPatchConfig.tun.autoRoute;
|
||||||
|
rawConfig['geodata-loader'] = realPatchConfig.geodataLoader.name;
|
||||||
|
if (rawConfig['sniffer']?['sniff'] != null) {
|
||||||
|
for (final value in (rawConfig['sniffer']?['sniff'] as Map).values) {
|
||||||
|
if (value['ports'] != null && value['ports'] is List) {
|
||||||
|
value['ports'] =
|
||||||
|
value['ports']?.map((item) => item.toString()).toList() ?? [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rawConfig['profile'] == null) {
|
||||||
|
rawConfig['profile'] = {};
|
||||||
|
}
|
||||||
|
if (rawConfig['proxy-providers'] != null) {
|
||||||
|
final proxyProviders = rawConfig['proxy-providers'] as Map;
|
||||||
|
for (final key in proxyProviders.keys) {
|
||||||
|
final proxyProvider = proxyProviders[key];
|
||||||
|
if (proxyProvider['type'] != 'http') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (proxyProvider['url'] != null) {
|
||||||
|
proxyProvider['path'] = getProvidersFilePathInner(
|
||||||
|
'proxies',
|
||||||
|
proxyProvider['url'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rawConfig['rule-providers'] != null) {
|
||||||
|
final ruleProviders = rawConfig['rule-providers'] as Map;
|
||||||
|
for (final key in ruleProviders.keys) {
|
||||||
|
final ruleProvider = ruleProviders[key];
|
||||||
|
if (ruleProvider['type'] != 'http') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (ruleProvider['url'] != null) {
|
||||||
|
ruleProvider['path'] = getProvidersFilePathInner(
|
||||||
|
'rules',
|
||||||
|
ruleProvider['url'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rawConfig['profile']['store-selected'] = false;
|
||||||
|
rawConfig['geox-url'] = realPatchConfig.geoXUrl.toJson();
|
||||||
|
rawConfig['global-ua'] = realPatchConfig.globalUa ?? defaultUA;
|
||||||
|
if (rawConfig['hosts'] == null) {
|
||||||
|
rawConfig['hosts'] = {};
|
||||||
|
}
|
||||||
|
for (final host in realPatchConfig.hosts.entries) {
|
||||||
|
rawConfig['hosts'][host.key] = host.value.splitByMultipleSeparators;
|
||||||
|
}
|
||||||
|
if (rawConfig['dns'] == null) {
|
||||||
|
rawConfig['dns'] = {};
|
||||||
|
}
|
||||||
|
final isEnableDns = rawConfig['dns']['enable'] == true;
|
||||||
|
final systemDns = 'system://';
|
||||||
|
if (overrideDns || !isEnableDns) {
|
||||||
|
final dns = switch (!isEnableDns) {
|
||||||
|
true => realPatchConfig.dns.copyWith(
|
||||||
|
nameserver: [...realPatchConfig.dns.nameserver, systemDns],
|
||||||
|
),
|
||||||
|
false => realPatchConfig.dns,
|
||||||
|
};
|
||||||
|
rawConfig['dns'] = dns.toJson();
|
||||||
|
rawConfig['dns']['nameserver-policy'] = {};
|
||||||
|
for (final entry in dns.nameserverPolicy.entries) {
|
||||||
|
rawConfig['dns']['nameserver-policy'][entry.key] =
|
||||||
|
entry.value.splitByMultipleSeparators;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (appendSystemDns) {
|
||||||
|
final List<String> nameserver = List<String>.from(
|
||||||
|
rawConfig['dns']['nameserver'] ?? [],
|
||||||
|
);
|
||||||
|
if (!nameserver.contains(systemDns)) {
|
||||||
|
rawConfig['dns']['nameserver'] = [...nameserver, systemDns];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<String> rules = [];
|
||||||
|
if (rawConfig['rules'] != null) {
|
||||||
|
rules = List<String>.from(rawConfig['rules']);
|
||||||
|
}
|
||||||
|
rawConfig.remove('rules');
|
||||||
|
if (addedRules.isNotEmpty) {
|
||||||
|
final parsedNewRules = addedRules
|
||||||
|
.map((item) => ParsedRule.parseString(item.value))
|
||||||
|
.toList();
|
||||||
|
final hasMatchPlaceholder = parsedNewRules.any(
|
||||||
|
(item) => item.ruleTarget?.toUpperCase() == 'MATCH',
|
||||||
|
);
|
||||||
|
String? replacementTarget;
|
||||||
|
|
||||||
|
if (hasMatchPlaceholder) {
|
||||||
|
for (int i = rules.length - 1; i >= 0; i--) {
|
||||||
|
final parsed = ParsedRule.parseString(rules[i]);
|
||||||
|
if (parsed.ruleAction == RuleAction.MATCH) {
|
||||||
|
final target = parsed.ruleTarget;
|
||||||
|
if (target != null && target.isNotEmpty) {
|
||||||
|
replacementTarget = target;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
final List<String> finalAddedRules;
|
||||||
|
|
||||||
|
if (replacementTarget?.isNotEmpty == true) {
|
||||||
|
finalAddedRules = [];
|
||||||
|
for (int i = 0; i < parsedNewRules.length; i++) {
|
||||||
|
final parsed = parsedNewRules[i];
|
||||||
|
if (parsed.ruleTarget?.toUpperCase() == 'MATCH') {
|
||||||
|
finalAddedRules.add(
|
||||||
|
parsed.copyWith(ruleTarget: replacementTarget).value,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
finalAddedRules.add(addedRules[i].value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
finalAddedRules = addedRules.map((e) => e.value).toList();
|
||||||
|
}
|
||||||
|
rules = [...finalAddedRules, ...rules];
|
||||||
|
}
|
||||||
|
rawConfig['rules'] = rules;
|
||||||
|
return rawConfig;
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<Map<String, dynamic>> handleEvaluate(
|
||||||
|
String scriptContent,
|
||||||
|
Map<String, dynamic> config,
|
||||||
|
) async {
|
||||||
|
if (config['proxy-providers'] == null) {
|
||||||
|
config['proxy-providers'] = {};
|
||||||
}
|
}
|
||||||
rawConfig['rule'] = rules;
|
final configJs = json.encode(config);
|
||||||
return rawConfig;
|
final runtime = getJavascriptRuntime();
|
||||||
|
final res = await runtime.evaluateAsync('''
|
||||||
|
$scriptContent
|
||||||
|
main($configJs)
|
||||||
|
''');
|
||||||
|
if (res.isError) {
|
||||||
|
throw res.stringResult;
|
||||||
|
}
|
||||||
|
final value = switch (res.rawResult is ffi.Pointer) {
|
||||||
|
true => runtime.convertValue<Map<String, dynamic>>(res),
|
||||||
|
false => Map<String, dynamic>.from(res.rawResult),
|
||||||
|
};
|
||||||
|
return value ?? config;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetupState getSetupState(String? profileId) {
|
||||||
|
final profile = config.profiles.getProfile(profileId);
|
||||||
|
final profileState = VM3(
|
||||||
|
a: profile?.id,
|
||||||
|
b: profile?.lastUpdateDate,
|
||||||
|
c: profile?.overwrite,
|
||||||
|
);
|
||||||
|
final overwrite = profileState.c;
|
||||||
|
final scriptContent = config.scripts
|
||||||
|
.get(overwrite?.scriptOverwrite.scriptId)
|
||||||
|
?.content;
|
||||||
|
final standardOverwrite =
|
||||||
|
overwrite?.standardOverwrite ?? StandardOverwrite();
|
||||||
|
final rules = config.rules;
|
||||||
|
final globalAddedRules = rules.where(
|
||||||
|
(item) => !standardOverwrite.disabledRuleIds.contains(item.id),
|
||||||
|
);
|
||||||
|
final addedRules = [...standardOverwrite.addedRules, ...globalAddedRules];
|
||||||
|
return SetupState(
|
||||||
|
profileId: profileId,
|
||||||
|
profileLastUpdateDate: profile?.lastUpdateDate?.millisecondsSinceEpoch,
|
||||||
|
overwriteType: profile?.overwrite.type ?? OverwriteType.standard,
|
||||||
|
addedRules: addedRules,
|
||||||
|
scriptContent: scriptContent,
|
||||||
|
overrideDns: config.overrideDns,
|
||||||
|
dns: config.patchClashConfig.dns,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Map<String, dynamic>> getProfileConfig(String profileId) async {
|
Future<Map<String, dynamic>> getProfileConfig(String profileId) async {
|
||||||
@@ -520,32 +655,6 @@ class GlobalState {
|
|||||||
configMap.remove('rule');
|
configMap.remove('rule');
|
||||||
return configMap;
|
return configMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Map<String, dynamic>> handleEvaluate(
|
|
||||||
Map<String, dynamic> config,
|
|
||||||
) async {
|
|
||||||
final currentScript = globalState.config.scriptProps.currentScript;
|
|
||||||
if (currentScript == null) {
|
|
||||||
return config;
|
|
||||||
}
|
|
||||||
if (config['proxy-providers'] == null) {
|
|
||||||
config['proxy-providers'] = {};
|
|
||||||
}
|
|
||||||
final configJs = json.encode(config);
|
|
||||||
final runtime = getJavascriptRuntime();
|
|
||||||
final res = await runtime.evaluateAsync('''
|
|
||||||
${currentScript.content}
|
|
||||||
main($configJs)
|
|
||||||
''');
|
|
||||||
if (res.isError) {
|
|
||||||
throw res.stringResult;
|
|
||||||
}
|
|
||||||
final value = switch (res.rawResult is Pointer) {
|
|
||||||
true => runtime.convertValue<Map<String, dynamic>>(res),
|
|
||||||
false => Map<String, dynamic>.from(res.rawResult),
|
|
||||||
};
|
|
||||||
return value ?? config;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final globalState = GlobalState();
|
final globalState = GlobalState();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:fl_clash/common/common.dart';
|
|||||||
import 'package:fl_clash/providers/config.dart';
|
import 'package:fl_clash/providers/config.dart';
|
||||||
import 'package:fl_clash/state.dart';
|
import 'package:fl_clash/state.dart';
|
||||||
import 'package:fl_clash/widgets/list.dart';
|
import 'package:fl_clash/widgets/list.dart';
|
||||||
|
import 'package:fl_clash/widgets/scaffold.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
|
||||||
@@ -24,17 +25,12 @@ class AboutView extends StatelessWidget {
|
|||||||
const AboutView({super.key});
|
const AboutView({super.key});
|
||||||
|
|
||||||
Future<void> _checkUpdate(BuildContext context) async {
|
Future<void> _checkUpdate(BuildContext context) async {
|
||||||
final commonScaffoldState = context.commonScaffoldState;
|
|
||||||
if (commonScaffoldState?.mounted != true) return;
|
|
||||||
final data = await globalState.appController.safeRun<Map<String, dynamic>?>(
|
final data = await globalState.appController.safeRun<Map<String, dynamic>?>(
|
||||||
request.checkForUpdate,
|
request.checkForUpdate,
|
||||||
title: appLocalizations.checkUpdate,
|
title: appLocalizations.checkUpdate,
|
||||||
needLoading: true,
|
needLoading: true,
|
||||||
);
|
);
|
||||||
globalState.appController.checkUpdateResultHandle(
|
globalState.appController.checkUpdateResultHandle(data: data, isUser: true);
|
||||||
data: data,
|
|
||||||
handleError: true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _buildMoreSection(BuildContext context) {
|
List<Widget> _buildMoreSection(BuildContext context) {
|
||||||
@@ -78,12 +74,12 @@ class AboutView extends StatelessWidget {
|
|||||||
List<Widget> _buildContributorsSection() {
|
List<Widget> _buildContributorsSection() {
|
||||||
const contributors = [
|
const contributors = [
|
||||||
Contributor(
|
Contributor(
|
||||||
avatar: 'assets/images/avatars/june2.jpg',
|
avatar: 'assets/images/avatar/june2.jpg',
|
||||||
name: 'June2',
|
name: 'June2',
|
||||||
link: 'https://t.me/Jibadong',
|
link: 'https://t.me/Jibadong',
|
||||||
),
|
),
|
||||||
Contributor(
|
Contributor(
|
||||||
avatar: 'assets/images/avatars/arue.jpg',
|
avatar: 'assets/images/avatar/arue.jpg',
|
||||||
name: 'Arue',
|
name: 'Arue',
|
||||||
link: 'https://t.me/xrcm6868',
|
link: 'https://t.me/xrcm6868',
|
||||||
),
|
),
|
||||||
@@ -170,9 +166,12 @@ class AboutView extends StatelessWidget {
|
|||||||
..._buildContributorsSection(),
|
..._buildContributorsSection(),
|
||||||
..._buildMoreSection(context),
|
..._buildMoreSection(context),
|
||||||
];
|
];
|
||||||
return Padding(
|
return BaseScaffold(
|
||||||
padding: kMaterialListPadding.copyWith(top: 16, bottom: 16),
|
title: appLocalizations.about,
|
||||||
child: generateListView(items),
|
body: Padding(
|
||||||
|
padding: kMaterialListPadding.copyWith(top: 16, bottom: 16),
|
||||||
|
child: generateListView(items),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||