Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kodakjerec committed Jun 19, 2024
1 parent 2abd3ee commit 55e1194
Show file tree
Hide file tree
Showing 30 changed files with 3,373 additions and 138 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
applicationId "com.kota.Bahamut"
minSdk 26
targetSdk 34
versionCode 21
versionCode 22
versionName "2.4"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ public void loadUrl(String url) {

// 非圖片類比較會有擷取問題
if (!_isPic && (_title.equals("") || _description.equals(""))) {
String userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0";
String userAgent = System.getProperty("http.agent");
if (_url.contains("youtu") || _url.contains("amazon"))
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0";

// cookie
// Create a new Map to store cookies
Expand Down Expand Up @@ -178,6 +180,10 @@ public void loadUrl(String url) {
_imageUrl = document.select("meta[property=og:image]").attr("content");
if (_imageUrl.isEmpty())
_imageUrl = document.select("meta[property=og:image]").attr("content");
if (_imageUrl.isEmpty())
_imageUrl = document.select("meta[property=og:images]").attr("content");
if (_imageUrl.isEmpty())
_imageUrl = document.select("#landingImage").attr("src");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ class ArticleEssencePage : TelnetPage(), View.OnClickListener, SendMailPage_List
itemViewOrigin = ArticlePage_TimeTimeView(context)
}
} else {
if (type == ArticlePageItemType.Content) {
if (type == ArticlePageItemType.Content)
itemViewOrigin = ArticlePage_TextItemView(context)
}
else
itemViewOrigin = itemView
}

if (itemViewOrigin == null)
Expand Down Expand Up @@ -208,7 +209,7 @@ class ArticleEssencePage : TelnetPage(), View.OnClickListener, SendMailPage_List
}

override fun onPageDidLoad() {
mainLayout = findViewById(R.id.contentView) as RelativeLayout
mainLayout = findViewById(R.id.content_view) as RelativeLayout
telnetViewBlock = mainLayout!!.findViewById(R.id.Essence_contentTelnetViewBlock)
telnetView = mainLayout!!.findViewById(R.id.Essence_contentTelnetView)
reloadTelnetLayout()
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/java/com/kota/Bahamut/Pages/MailPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public boolean isPopupPage() {
}

public void onPageDidLoad() {
mainLayout = (RelativeLayout) findViewById(R.id.contentView);
mainLayout = (RelativeLayout) findViewById(R.id.content_view);

telnetViewBlock = mainLayout.findViewById(R.id.Mail_contentTelnetViewBlock);
telnetView = mainLayout.findViewById(R.id.Mail_contentTelnetView);
Expand Down Expand Up @@ -153,6 +153,11 @@ public View getView(int itemIndex, View itemView, ViewGroup parentView) {
case ArticlePageItemType.PostTime ->
itemViewOrigin = new ArticlePage_TimeTimeView(getContext());
}
} else {
if (type == ArticlePageItemType.Content)
itemViewOrigin = new ArticlePage_TextItemView(getContext());
else
itemViewOrigin = itemView;
}

if (itemViewOrigin == null)
Expand Down
9 changes: 8 additions & 1 deletion app/src/main/java/com/kota/Bahamut/Pages/MainPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,20 @@ public boolean onBackPressed() {

public void onProcessHotMessage() {
if (this._save_hot_message_dialog == null) {
this._save_hot_message_dialog = ASAlertDialog.createDialog().setTitle("熱訊").setMessage("本次上站熱訊處理 ").addButton("備忘錄").addButton("保留").addButton("清除").setListener((aDialog, index) -> {
this._save_hot_message_dialog = ASAlertDialog.createDialog()
.setTitle("熱訊")
.setMessage("本次上站熱訊處理 ")
.addButton("備忘錄")
.addButton("保留")
.addButton("清除")
.setListener((aDialog, index) -> {
MainPage.this._save_hot_message_dialog = null;
switch (index) {
case 0 -> TelnetClient.getClient().sendStringToServerInBackground("M");
case 1 -> TelnetClient.getClient().sendStringToServerInBackground("K");
case 2 -> TelnetClient.getClient().sendStringToServerInBackground("C");
default -> {
TelnetClient.getClient().sendStringToServerInBackground("K");
}
}
}).scheduleDismissOnPageDisappear(this).setOnBackDelegate(aDialog -> {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/article_essence_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/contentView"
android:id="@+id/content_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
Expand Down
15 changes: 11 additions & 4 deletions app/src/main/res/layout/article_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,27 @@
android:id="@+id/content_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:orientation="vertical"
<LinearLayout
android:id="@+id/Article_contentView"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout android:id="@+id/ext_toolbar" style="@style/ExtToolbar">
<Button android:id="@+id/do_gy" android:text="@string/do_gy" style="@style/ExtToolbarItem"/>
<View style="@style/ToolbarDivider"/>
<Button android:id="@+id/change_mode" android:text="@string/change_mode" style="@style/ExtToolbarItem"/>
<View style="@style/ToolbarDivider"/>
<Button android:id="@+id/show_link" android:text="@string/open_url" style="@style/ExtToolbarItem"/>
</LinearLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<!-- 文字模式 -->
<FrameLayout android:id="@+id/Article_TextContentView" android:layout_width="match_parent" android:layout_height="match_parent">
<FrameLayout
android:id="@+id/Article_TextContentView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.kota.TelnetUI.TextView.TelnetTextViewUltraLarge android:id="@+id/Article_listEmptyView" android:textColor="@color/white" android:gravity="center" android:visibility="invisible" android:layout_width="match_parent" android:layout_height="match_parent" android:text="@string/loading_" style="@style/TextViewUltraLarge"/>
<com.kota.ASFramework.UI.ASListView
android:id="@+id/Article_contentList"
Expand Down
23 changes: 14 additions & 9 deletions app/src/main/res/layout/mail_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/contentView"
android:id="@+id/content_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
Expand All @@ -14,16 +14,21 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<com.kota.TelnetUI.TextView.TelnetTextViewUltraLarge android:id="@+id/Mail_listEmptyView" android:textColor="@color/white" android:gravity="center" android:visibility="invisible" android:layout_width="match_parent" android:layout_height="match_parent" android:text="@string/loading_" style="@style/TextViewUltraLarge"/>
<!-- 文字模式 -->
<com.kota.ASFramework.UI.ASListView
android:id="@+id/Mail_contentList"
style="@style/List"
<FrameLayout
android:id="@+id/Mail_TextContentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/divider_color"
android:listSelector="@null"
android:scrollbars="vertical" />
android:layout_height="match_parent">
<com.kota.TelnetUI.TextView.TelnetTextViewUltraLarge android:id="@+id/Mail_listEmptyView" android:textColor="@color/white" android:gravity="center" android:visibility="invisible" android:layout_width="match_parent" android:layout_height="match_parent" android:text="@string/loading_" style="@style/TextViewUltraLarge"/>
<com.kota.ASFramework.UI.ASListView
android:id="@+id/Mail_contentList"
style="@style/List"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/divider_color"
android:listSelector="@null"
android:scrollbars="vertical" />
</FrameLayout>
<!-- telnet模式 -->
<com.kota.ASFramework.UI.ASScrollView
android:id="@+id/Mail_contentTelnetViewBlock"
Expand Down
10 changes: 5 additions & 5 deletions book/outline.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 戰巴哈操作手冊
```製作中,困難操作才會放上來```
## 功能
1. [看板](board.md)
2. [正下方工具列](toolBar.md)
3. [浮動工具列](toolBarFloating.md)
4. [側邊選單](drawer.md)
5. [書籤管理](bookmarkManager.md)
* [正下方工具列](toolBar.md)
* [浮動工具列](toolBarFloating.md)
* [側邊選單](drawer.md)
* [書籤管理](bookmarkManager.md)
* [短網址](shortUrl.md)
Binary file added book/pics/shortUrl.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/pics/shortUrl_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions book/shortUrl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 短網址
## 操作
* 發文頁面,下方工具列可呼叫出發文工具
* 「短網址」進入短網址產生頁面
![image](pics/shortUrl_01.png)
* 把網址貼到上方框裡面
* 按鈕「縮址」產生短網址
* 按鈕「送出」貼到文章內
## 方便操作
* 進入頁面會自動擷取剪貼簿內容,並擷取出連結文字。方便自己再做後續處理去掉個人廣告資訊
* 按鈕「紀錄」查詢之前送出過的短網址
## 注意
* 每小時上限200次轉址(全部用戶共享)
## 示範影片
![image](pics/shortUrl.gif)
12 changes: 12 additions & 0 deletions cloud/cloudflare/cloud-backup/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# http://editorconfig.org
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
172 changes: 172 additions & 0 deletions cloud/cloudflare/cloud-backup/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp
.cache

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*

# wrangler project

.dev.vars
.wrangler/
Loading

0 comments on commit 55e1194

Please sign in to comment.