diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8f25f0a9..8001015b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,13 @@ + + + @@ -12,6 +19,7 @@ + + + + + + Donation.donateByAlipay(this, "FKX025062MBLAG6E90RYBC") }) - .setNegativeButton(R.string.support_donate_qq, { _, _ -> - Donation.donateByQQ(this) - }) .setNeutralButton(android.R.string.no, null) .show() } diff --git a/app/src/main/java/io/neoterm/ui/support/Donation.kt b/app/src/main/java/io/neoterm/ui/support/Donation.kt index 667b606b..9ec15f0a 100644 --- a/app/src/main/java/io/neoterm/ui/support/Donation.kt +++ b/app/src/main/java/io/neoterm/ui/support/Donation.kt @@ -20,15 +20,6 @@ object Donation { return startIntentUrl(activity, INTENT_URL_FORMAT.replace("{payCode}", payCode)) } - fun donateByQQ(context: Context) { - val qrImage = ImageView(context) - qrImage.setImageResource(R.drawable.donation_qq) - AlertDialog.Builder(context) - .setView(qrImage) - .setPositiveButton(android.R.string.yes, null) - .show() - } - private fun startIntentUrl(activity: Activity, intentFullUrl: String): Boolean { return try { val intent = Intent.parseUri( diff --git a/app/src/main/java/io/neoterm/ui/term/NeoTermActivity.kt b/app/src/main/java/io/neoterm/ui/term/NeoTermActivity.kt index 3d84bf89..dec97156 100644 --- a/app/src/main/java/io/neoterm/ui/term/NeoTermActivity.kt +++ b/app/src/main/java/io/neoterm/ui/term/NeoTermActivity.kt @@ -339,10 +339,9 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference if (!tabSwitcher.isSwitcherShown) { toggleSwitcher(showSwitcher = true, easterEgg = false) } - val index = tabSwitcher.count // Fore system shell mode to be enabled. - addNewSession("NeoTerm #" + index, true, createRevealAnimation()) + addNewSession(null, true, createRevealAnimation()) } private fun enterMain() { @@ -352,11 +351,19 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference for (session in termService!!.sessions) { addNewSession(session) } - switchToSession(getStoredCurrentSessionOrLast()) + + if (intent?.action == Intent.ACTION_RUN) { + // app shortcuts + addNewSession(null, + false, createRevealAnimation()) + } else { + switchToSession(getStoredCurrentSessionOrLast()); + } + } else { toggleSwitcher(showSwitcher = true, easterEgg = false) // Fore system shell mode to be disabled. - addNewSession("NeoTerm #0", false, createRevealAnimation()) + addNewSession(null, false, createRevealAnimation()) } } @@ -397,8 +404,7 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference if (!tabSwitcher.isSwitcherShown) { toggleSwitcher(showSwitcher = true, easterEgg = false) } - val index = tabSwitcher.count - addNewSession("NeoTerm #" + index, getSystemShellMode(), createRevealAnimation()) + addNewSession(null, getSystemShellMode(), createRevealAnimation()) } private fun addNewSession(session: TerminalSession?) { @@ -433,9 +439,7 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference .systemShell(systemShell) val session = termService!!.createTermSession(parameter) - if (sessionName != null) { - session.mSessionName = sessionName - } + session.mSessionName = sessionName ?: "NeoTerm #${termService!!.sessions.size}" val tab = createTab(sessionName) as TermTab tab.termData.initializeSessionWith(session, sessionCallback, viewClient) diff --git a/app/src/main/res/drawable/banner.png b/app/src/main/res/drawable/banner.png new file mode 100644 index 00000000..43f24118 Binary files /dev/null and b/app/src/main/res/drawable/banner.png differ diff --git a/app/src/main/res/drawable/donation_qq.png b/app/src/main/res/drawable/donation_qq.png deleted file mode 100644 index bb387cc3..00000000 Binary files a/app/src/main/res/drawable/donation_qq.png and /dev/null differ diff --git a/app/src/main/res/drawable/ic_new_session.xml b/app/src/main/res/drawable/ic_new_session.xml new file mode 100644 index 00000000..247eeef0 --- /dev/null +++ b/app/src/main/res/drawable/ic_new_session.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 2b2c46d6..2e110eae 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -109,9 +109,8 @@ 如果你喜欢这个app,你可以考虑请作者喝杯咖啡 Kiva 维护\nCrixec 图标设计 特别鸣谢 - nullptr 时刻支持我\n酷安用户 @NimaQu 赞助服务器\nQQ用户 @My 提供免费网络 + 酷安用户 @NimaQu 赞助服务器\nQQ用户 @My 提供免费网络 这个app是我在课余时间制作的,一个人不仅要维护app,还要维护各种软件包和服务器,如果能得到你的支持,我将更有动力继续将app完善下去 - QQ 支付宝 新建配色方案 常见问题 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 36d9cf91..c56e6762 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -106,8 +106,7 @@ 如果你喜歡這個app,你可以考慮請作者喝杯咖啡 Kiva 維護\nCrixec 圖標設計 特別鳴謝 - nullptr 時刻支持我\n酷安用戶 @NimaQu 贊助服務器\nQQ用戶 @My 提供免費網絡 + 酷安用戶 @NimaQu 贊助服務器\nQQ用戶 @My 提供免費網絡 這個app是我在課餘時間製作的,一個人不僅要維護app,還要維護各種套裝軟體和服務器,如果能得到你的支持,我將更有動力繼續完善下去 - QQ 支付寶 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4ba929e2..5fd4c544 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -113,11 +113,10 @@ Donate If you like this app, you can offer developers a cup of coffee This app is made in my spare time. Not only me needs to develop app, but also maintains various software packages and servers. If you can support me, I will be more motivated to improve this app. - QQ Alipay Kiva for Maintaining\nCrixec for Icon Design Acknowledgements - nullptr for accompanying me\nCoolApk User @NimaQu for providing server\nQQ User @My for providing free network + CoolApk User @NimaQu for providing server\nQQ User @My for providing free network New Color Scheme FAQ New diff --git a/app/src/main/res/xml/app_shortcuts.xml b/app/src/main/res/xml/app_shortcuts.xml new file mode 100644 index 00000000..a0a3b819 --- /dev/null +++ b/app/src/main/res/xml/app_shortcuts.xml @@ -0,0 +1,14 @@ + + + + +