Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Adding pre-proxy setting to group
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust authored and AnGgIt86 committed Sep 23, 2024
1 parent d93adf9 commit 72a8636
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/src/main/kotlin/com/neko/v2ray/dto/SubscriptionItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ data class SubscriptionItem(
var lastUpdated: Long = -1,
var autoUpdate: Boolean = false,
val updateInterval: Int? = null,
var prevProfile: String? = null,
var nextProfile: String? = null,
)

6 changes: 6 additions & 0 deletions app/src/main/kotlin/com/neko/v2ray/ui/SubEditActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ class SubEditActivity : BaseActivity() {
binding.etUrl.text = Utils.getEditable(subItem.url)
binding.chkEnable.isChecked = subItem.enabled
binding.autoUpdateCheck.isChecked = subItem.autoUpdate
binding.etPreProfile.text = Utils.getEditable(subItem.prevProfile)
binding.etNextProfile.text = Utils.getEditable(subItem.nextProfile)
return true
}

Expand All @@ -111,6 +113,8 @@ class SubEditActivity : BaseActivity() {
binding.etRemarks.text = null
binding.etUrl.text = null
binding.chkEnable.isChecked = true
binding.etPreProfile.text = null
binding.etNextProfile.text = null
return true
}

Expand All @@ -132,6 +136,8 @@ class SubEditActivity : BaseActivity() {
subItem.url = binding.etUrl.text.toString()
subItem.enabled = binding.chkEnable.isChecked
subItem.autoUpdate = binding.autoUpdateCheck.isChecked
subItem.prevProfile = binding.etPreProfile.text.toString()
subItem.nextProfile = binding.etNextProfile.text.toString()

if (TextUtils.isEmpty(subItem.remarks)) {
toast(R.string.sub_setting_remarks)
Expand Down
51 changes: 49 additions & 2 deletions app/src/main/res/layout/activity_sub_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,30 @@
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/sub_setting_url"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:gravity="top"
android:id="@+id/et_url"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10.0dip"
android:maxLines="10"
android:minLines="2"
android:inputType="textMultiLine"
tools:ignore="TextFields" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
Expand Down Expand Up @@ -329,6 +353,29 @@
android:paddingStart="2.0dip"
android:paddingEnd="6.0dip" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/sub_setting_pre_profile"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:gravity="top"
android:id="@+id/et_pre_profile"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10.0dip"
android:maxLines="10"
android:minLines="5"
android:inputType="textMultiLine" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
Expand All @@ -338,11 +385,11 @@
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/sub_setting_url"
android:hint="@string/sub_setting_next_profile"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:gravity="top"
android:id="@+id/et_url"
android:id="@+id/et_next_profile"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">عنوان URL اختياري</string>
<string name="sub_setting_enable">تمكين التحديث</string>
<string name="sub_auto_update">تمكين التحديث التلقائي</string>
<string name="sub_setting_pre_profile">تصريحات الوكالة السابقة</string>
<string name="sub_setting_next_profile">تصريحات الوكيل التالية</string>
<string name="sub_setting_pre_profile_tip">الملاحظات موجودة وهي فريدة من نوعها</string>
<string name="title_sub_update">تحديث الاشتراك</string>
<string name="title_ping_all_server">Tcping كل التكوين</string>
<string name="title_real_ping_all_server">تأخير حقيقي كل التكوين</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@
<string name="sub_setting_url">URL اختیاری</string>
<string name="sub_setting_enable">فعال کردن آپدیت</string>
<string name="sub_auto_update">فعال کردن به روز رسانی خودکار</string>
<string name="sub_setting_pre_profile">اظهارات نیابتی قبلی</string>
<string name="sub_setting_next_profile">اظهارات پروکسی بعدی</string>
<string name="sub_setting_pre_profile_tip">اظهارات وجود دارد و منحصر به فرد است</string>
<string name="title_sub_update">تحديث اشتراك المجموعة الحالية</string>
<string name="title_ping_all_server">تكوين المجموعة الحالية Tcping</string>
<string name="title_real_ping_all_server">تأخير حقيقي لتكوين المجموعة الحالية</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">URL Opsi</string>
<string name="sub_setting_enable">Aktifkan pembaruan</string>
<string name="sub_auto_update">Aktifkan pembaruan otomatis</string>
<string name="sub_setting_pre_profile">Pernyataan proksi sebelumnya</string>
<string name="sub_setting_next_profile">Keterangan proxy berikutnya</string>
<string name="sub_setting_pre_profile_tip">Komentar tersebut ada dan unik</string>
<string name="title_sub_update">Perbarui langganan grup saat ini</string>
<string name="title_ping_all_server">Tcping config grup saat ini</string>
<string name="title_real_ping_all_server">Real delay config grup saat ini</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">オプションの URL</string>
<string name="sub_setting_enable">アップデートを有効にする</string>
<string name="sub_auto_update">自動更新を有効にする</string>
<string name="sub_setting_pre_profile">以前の代理人の発言</string>
<string name="sub_setting_next_profile">次回の代理発言</string>
<string name="sub_setting_pre_profile_tip">発言は存在し、ユニークである</string>
<string name="title_sub_update">現在のグループ サブスクリプションを更新</string>
<string name="title_ping_all_server">現在のグループ構成を TCP 処理</string>
<string name="title_real_ping_all_server">現在のグループ構成を実際に遅延</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-jw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">URL Pilihan</string>
<string name="sub_setting_enable">Aktifake nganyari</string>
<string name="sub_auto_update">Aktifake nganyari otomatis</string>
<string name="sub_setting_pre_profile">Komentar proxy sadurunge</string>
<string name="sub_setting_next_profile">Komentar proxy sabanjure</string>
<string name="sub_setting_pre_profile_tip">Ukara kasebut ana lan unik</string>
<string name="title_sub_update">Update langganan grup saiki</string>
<string name="title_ping_all_server">Tcping config grup saiki</string>
<string name="title_real_ping_all_server">Real delay config grup saiki</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">Необязательный URL-адрес</string>
<string name="sub_setting_enable">Включить обновление</string>
<string name="sub_auto_update">Включить автоматическое обновление</string>
<string name="sub_setting_pre_profile">Предыдущие замечания доверенности</string>
<string name="sub_setting_next_profile">Следующие замечания доверенного лица</string>
<string name="sub_setting_pre_profile_tip">Замечание существует и является уникальным</string>
<string name="title_sub_update">Обновить подписку на текущую группу</string>
<string name="title_ping_all_server">Tcping текущей конфигурации группы</string>
<string name="title_real_ping_all_server">Реальная задержка текущей конфигурации группы</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-su/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">URL pilihan</string>
<string name="sub_setting_enable">Aktipkeun apdet</string>
<string name="sub_auto_update">Aktipkeun apdet otomatis</string>
<string name="sub_setting_pre_profile">Ucapan proxy saméméhna</string>
<string name="sub_setting_next_profile">Catetan proxy salajengna</string>
<string name="sub_setting_pre_profile_tip">Koméntar aya sareng unik</string>
<string name="title_sub_update">Apdet langganan grup ayeuna</string>
<string name="title_ping_all_server">Tcping konfigurasi grup ayeuna</string>
<string name="title_real_ping_all_server">Konfigurasi grup ayeuna reureuh nyata</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">URL tùy chọn</string>
<string name="sub_setting_enable">Bật cập nhật</string>
<string name="sub_auto_update">Bật cập nhật tự động</string>
<string name="sub_setting_pre_profile">Nhận xét ủy quyền trước đó</string>
<string name="sub_setting_next_profile">Nhận xét của đại diện tiếp theo</string>
<string name="sub_setting_pre_profile_tip">Nhận xét tồn tại và là duy nhất</string>
<string name="title_sub_update">Cập nhật đăng ký nhóm hiện tại</string>
<string name="title_ping_all_server">Cấu hình nhóm hiện tại của TCP</string>
<string name="title_real_ping_all_server">Cấu hình nhóm hiện tại trễ thực</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">可选网址</string>
<string name="sub_setting_enable">启用更新</string>
<string name="sub_auto_update">启用自动更新</string>
<string name="sub_setting_pre_profile">先前的代理意见</string>
<string name="sub_setting_next_profile">下一个代理备注</string>
<string name="sub_setting_pre_profile_tip">该评论存在且独特</string>
<string name="title_sub_update">更新当前组订阅</string>
<string name="title_ping_all_server">测试当前组配置Tcping</string>
<string name="title_real_ping_all_server">测试当前组配置真连接</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
<string name="sub_setting_url">可選網址</string>
<string name="sub_setting_enable">啟用更新</string>
<string name="sub_auto_update">啟用自動更新</string>
<string name="sub_setting_pre_profile">之前的代理備註</string>
<string name="sub_setting_next_profile">接下來的代理備註</string>
<string name="sub_setting_pre_profile_tip">備註存在且唯一</string>
<string name="title_sub_update">更新目前群組訂閱</string>
<string name="title_ping_all_server">偵測目前群組配置 Tcping</string>
<string name="title_real_ping_all_server">偵測目前群組配置真延遲</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@
<string name="sub_setting_url">Optional URL</string>
<string name="sub_setting_enable">Enable update</string>
<string name="sub_auto_update">Enable automatic update</string>
<string name="sub_setting_pre_profile">Previous proxy remarks</string>
<string name="sub_setting_next_profile">Next proxy remarks</string>
<string name="sub_setting_pre_profile_tip">The remarks exists and is unique</string>
<string name="title_sub_update">Update current group subscription</string>
<string name="title_ping_all_server">Tcping current group configuration</string>
<string name="title_real_ping_all_server">Real delay current group configuration</string>
Expand Down

0 comments on commit 72a8636

Please sign in to comment.