mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-19 16:10:31 -08:00
renamed app to anixstream
This commit is contained in:
21
anixstream/View/CrashLogScreen/crashlog_screen.kv
Normal file
21
anixstream/View/CrashLogScreen/crashlog_screen.kv
Normal file
@@ -0,0 +1,21 @@
|
||||
#:import get_color_from_hex kivy.utils.get_color_from_hex
|
||||
#:import StringProperty kivy.properties.StringProperty
|
||||
|
||||
<CrashLogScreenView>
|
||||
md_bg_color: self.theme_cls.backgroundColor
|
||||
# main_container:main_container
|
||||
MDBoxLayout:
|
||||
NavRail:
|
||||
screen:root
|
||||
MDAnchorLayout:
|
||||
anchor_y: 'top'
|
||||
padding:"10dp"
|
||||
MDBoxLayout:
|
||||
orientation: 'vertical'
|
||||
SearchBar:
|
||||
MDScrollView:
|
||||
MDLabel:
|
||||
text:root.crash_text
|
||||
adaptive_height:True
|
||||
markup:True
|
||||
padding:"10dp"
|
||||
21
anixstream/View/CrashLogScreen/crashlog_screen.py
Normal file
21
anixstream/View/CrashLogScreen/crashlog_screen.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from kivy.properties import StringProperty
|
||||
|
||||
from View.base_screen import BaseScreenView
|
||||
from Utility.utils import read_crash_file
|
||||
from Utility.kivy_markup_helper import color_text, bolden
|
||||
|
||||
|
||||
class CrashLogScreenView(BaseScreenView):
|
||||
"""The crash log screen"""
|
||||
|
||||
crash_text = StringProperty()
|
||||
|
||||
def __init__(self, **kw):
|
||||
super().__init__(**kw)
|
||||
if crashes := read_crash_file():
|
||||
self.crash_text = crashes
|
||||
else:
|
||||
self.crash_text = color_text(
|
||||
f"No Crashes so far :) and if there are any in the future {bolden('please report! Okay?')}",
|
||||
self.theme_cls.primaryColor,
|
||||
)
|
||||
Reference in New Issue
Block a user