mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-02-10 00:50:35 +01:00
コンテキストメニューに「アカウント/管理者WebUIで開く」を追加
This commit is contained in:
parent
0ba187e545
commit
826084b86f
@ -117,7 +117,7 @@ internal class DlgContextMenu(
|
|||||||
val btnAroundLTL : View = viewRoot.findViewById(R.id.btnAroundLTL)
|
val btnAroundLTL : View = viewRoot.findViewById(R.id.btnAroundLTL)
|
||||||
val btnAroundFTL : View = viewRoot.findViewById(R.id.btnAroundFTL)
|
val btnAroundFTL : View = viewRoot.findViewById(R.id.btnAroundFTL)
|
||||||
val btnCopyAccountId : Button = viewRoot.findViewById(R.id.btnCopyAccountId)
|
val btnCopyAccountId : Button = viewRoot.findViewById(R.id.btnCopyAccountId)
|
||||||
|
val btnOpenAccountInAdminWebUi :Button = viewRoot.findViewById(R.id.btnOpenAccountInAdminWebUi)
|
||||||
val llLinks : LinearLayout = viewRoot.findViewById(R.id.llLinks)
|
val llLinks : LinearLayout = viewRoot.findViewById(R.id.llLinks)
|
||||||
|
|
||||||
btnAroundAccountTL.setOnClickListener(this)
|
btnAroundAccountTL.setOnClickListener(this)
|
||||||
@ -162,6 +162,7 @@ internal class DlgContextMenu(
|
|||||||
btnDomainBlock.setOnClickListener(this)
|
btnDomainBlock.setOnClickListener(this)
|
||||||
btnEndorse.setOnClickListener(this)
|
btnEndorse.setOnClickListener(this)
|
||||||
btnCopyAccountId.setOnClickListener(this)
|
btnCopyAccountId.setOnClickListener(this)
|
||||||
|
btnOpenAccountInAdminWebUi.setOnClickListener(this)
|
||||||
|
|
||||||
viewRoot.findViewById<View>(R.id.btnQuoteUrlStatus).setOnClickListener(this)
|
viewRoot.findViewById<View>(R.id.btnQuoteUrlStatus).setOnClickListener(this)
|
||||||
viewRoot.findViewById<View>(R.id.btnQuoteUrlAccount).setOnClickListener(this)
|
viewRoot.findViewById<View>(R.id.btnQuoteUrlAccount).setOnClickListener(this)
|
||||||
@ -355,6 +356,7 @@ internal class DlgContextMenu(
|
|||||||
btnInstanceInformation.visibility = View.GONE
|
btnInstanceInformation.visibility = View.GONE
|
||||||
btnDomainBlock.visibility = View.GONE
|
btnDomainBlock.visibility = View.GONE
|
||||||
btnCopyAccountId.visibility = View.GONE
|
btnCopyAccountId.visibility = View.GONE
|
||||||
|
btnOpenAccountInAdminWebUi.visibility = View.GONE
|
||||||
} else {
|
} else {
|
||||||
val who_host = who.host
|
val who_host = who.host
|
||||||
btnInstanceInformation.visibility = View.VISIBLE
|
btnInstanceInformation.visibility = View.VISIBLE
|
||||||
@ -371,6 +373,9 @@ internal class DlgContextMenu(
|
|||||||
|
|
||||||
btnCopyAccountId.visibility = View.VISIBLE
|
btnCopyAccountId.visibility = View.VISIBLE
|
||||||
btnCopyAccountId.text = activity.getString(R.string.copy_account_id, who.id.toString() )
|
btnCopyAccountId.text = activity.getString(R.string.copy_account_id, who.id.toString() )
|
||||||
|
|
||||||
|
vg( btnOpenAccountInAdminWebUi , ! access_info.isPseudo)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewRoot.findViewById<View>(R.id.btnAccountText).setOnClickListener(this)
|
viewRoot.findViewById<View>(R.id.btnAccountText).setOnClickListener(this)
|
||||||
@ -755,6 +760,8 @@ internal class DlgContextMenu(
|
|||||||
)
|
)
|
||||||
|
|
||||||
R.id.btnCopyAccountId -> who.id.toString().copyToClipboard(activity)
|
R.id.btnCopyAccountId -> who.id.toString().copyToClipboard(activity)
|
||||||
|
|
||||||
|
R.id.btnOpenAccountInAdminWebUi -> App1.openBrowser(activity,"https://${access_info.host}/admin/accounts/${who.id}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -772,7 +772,20 @@
|
|||||||
|
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
/>
|
/>
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnOpenAccountInAdminWebUi"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/btn_bg_transparent"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:minHeight="32dp"
|
||||||
|
android:paddingBottom="4dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:text="@string/open_in_admin_ui"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnAccountQrCode"
|
android:id="@+id/btnAccountQrCode"
|
||||||
|
@ -847,5 +847,6 @@
|
|||||||
<string name="scheduled_status_requires_mastodon_2_7_0">予約投稿はマストドン2.7.0以降で使えます</string>
|
<string name="scheduled_status_requires_mastodon_2_7_0">予約投稿はマストドン2.7.0以降で使えます</string>
|
||||||
<string name="move_notifications_quick_filter_to_column_setting">通知カラムのクイックフィルタをカラム設定内部に表示する(アプリ再起動が必要)</string>
|
<string name="move_notifications_quick_filter_to_column_setting">通知カラムのクイックフィルタをカラム設定内部に表示する(アプリ再起動が必要)</string>
|
||||||
<string name="copy_account_id">アカウントID %1$s をコピー</string>
|
<string name="copy_account_id">アカウントID %1$s をコピー</string>
|
||||||
|
<string name="open_in_admin_ui">管理者WebUIで開く</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -868,5 +868,6 @@
|
|||||||
<string name="scheduled_status_requires_mastodon_2_7_0">Scheduled status requires Mastodon 2.7.0 or later.</string>
|
<string name="scheduled_status_requires_mastodon_2_7_0">Scheduled status requires Mastodon 2.7.0 or later.</string>
|
||||||
<string name="move_notifications_quick_filter_to_column_setting">Show notifications quick filter in column setting (app restart required)</string>
|
<string name="move_notifications_quick_filter_to_column_setting">Show notifications quick filter in column setting (app restart required)</string>
|
||||||
<string name="copy_account_id">Copy account ID %1$s</string>
|
<string name="copy_account_id">Copy account ID %1$s</string>
|
||||||
|
<string name="open_in_admin_ui">Open in admin web UI</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user