-
This commit is contained in:
parent
d2f5b3c745
commit
5026f6f74a
|
@ -48,7 +48,6 @@ class GameWidget(QWidget):
|
|||
self.childLayout.addWidget(self.settings)
|
||||
|
||||
self.childLayout.addStretch(1)
|
||||
# self.layout.addWidget(QLabel(game.title))
|
||||
self.layout.addLayout(self.childLayout)
|
||||
self.setLayout(self.layout)
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ def main():
|
|||
dia = LoginDialog()
|
||||
if not dia.login():
|
||||
main()
|
||||
# TODO
|
||||
|
||||
app.exec_()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ from PyQt5.QtWebEngineWidgets import QWebEngineView
|
|||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QScrollArea, QLineEdit, QPushButton
|
||||
|
||||
from Rare.GameWidget import GameWidget, UninstalledGameWidget
|
||||
from Rare.utils.legendaryUtils import get_installed, get_not_installed, logout
|
||||
from Rare.utils.legendaryUtils import get_installed, get_not_installed, logout, get_updates
|
||||
|
||||
|
||||
class BrowserTab(QWebEngineView):
|
||||
|
@ -22,6 +22,11 @@ class Settings(QWidget):
|
|||
self.logout_button.clicked.connect(self.logout)
|
||||
self.layout.addWidget(self.logout_button)
|
||||
|
||||
self.info_label = QLabel("<h2>Information</h2>")
|
||||
self.infotext = QLabel("""Developers : Dummerle, CommandMC\nLicence: GPL v3""")
|
||||
|
||||
self.layout.addWidget(self.info_label)
|
||||
self.layout.addWidget(self.infotext)
|
||||
self.layout.addStretch(1)
|
||||
self.setLayout(self.layout)
|
||||
|
||||
|
@ -72,5 +77,12 @@ class UpdateList(QWidget):
|
|||
def __init__(self, parent):
|
||||
super(UpdateList, self).__init__(parent=parent)
|
||||
self.layout = QVBoxLayout()
|
||||
self.layout.addWidget(QLabel("Updates"))
|
||||
updates = get_updates()
|
||||
if not updates:
|
||||
for game in get_updates():
|
||||
self.layout.addWidget(QLabel("Update available for " + game.title))
|
||||
|
||||
else:
|
||||
self.layout.addWidget(QLabel("No updates available"))
|
||||
self.layout.addStretch(1)
|
||||
self.setLayout(self.layout)
|
||||
|
|
|
@ -136,6 +136,14 @@ def auth_import(lutris: bool = False, wine_prefix: str = None) -> bool:
|
|||
return False
|
||||
|
||||
|
||||
def get_updates():
|
||||
|
||||
|
||||
update_games = []
|
||||
for game in core.get_installed_list():
|
||||
update_games.append(game) if get_game_by_name(game.app_name).app_version != game.version else None
|
||||
return update_games
|
||||
|
||||
def logout():
|
||||
core.lgd.invalidate_userdata()
|
||||
|
||||
|
|
Loading…
Reference in a new issue