Skip to content

Commit

Permalink
loglink removed from about and added to Logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pavankalyan767 authored and m3nu committed Jan 30, 2024
1 parent 0cc15e3 commit 3c18f86
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 36 deletions.
23 changes: 0 additions & 23 deletions src/vorta/assets/UI/abouttab.ui
Original file line number Diff line number Diff line change
Expand Up @@ -150,29 +150,6 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="topMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="logLink">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;file:///&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;View the logs&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="indent">
<number>0</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
Expand Down
46 changes: 39 additions & 7 deletions src/vorta/assets/UI/scheduletab.ui
Original file line number Diff line number Diff line change
Expand Up @@ -575,15 +575,21 @@
<x>0</x>
<y>0</y>
<width>687</width>
<height>384</height>
<height>402</height>
</rect>
</property>
<attribute name="label">
<string>Log</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QTableWidget" name="logTableWidget">
<property name="geometry">
<rect>
<x>9</x>
<y>39</y>
<width>671</width>
<height>361</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
Expand Down Expand Up @@ -624,17 +630,43 @@
<string>Returncode</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_3">
<property name="geometry">
<rect>
<x>20</x>
<y>0</y>
<width>621</width>
<height>28</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="topMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="logLink">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;file:///&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;View the logs&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="indent">
<number>0</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="page_3">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>687</width>
<height>384</height>
<height>402</height>
</rect>
</property>
<attribute name="label">
Expand Down
5 changes: 0 additions & 5 deletions src/vorta/views/about_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from PyQt6 import QtCore, uic

from vorta import config
from vorta._version import __version__
from vorta.store.models import BackupProfileMixin
from vorta.utils import get_asset
Expand All @@ -22,10 +21,6 @@ def __init__(self, parent=None):
super().__init__(parent)
self.setupUi(parent)
self.versionLabel.setText(__version__)
self.logLink.setText(
f'<a href="file://{config.LOG_DIR}"><span style="text-decoration:'
'underline; color:#0984e3;">Click here</span></a> to view the logs.'
)
self.gpl_logo.setPixmap(get_colored_icon('gpl_logo', scaled_height=40, return_qpixmap=True))
self.python_logo.setPixmap(get_colored_icon('python_logo', scaled_height=40, return_qpixmap=True))

Expand Down
6 changes: 5 additions & 1 deletion src/vorta/views/schedule_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
QTableWidgetItem,
)

from vorta import application
from vorta import application, config
from vorta.i18n import get_locale
from vorta.scheduler import ScheduleStatusType
from vorta.store.models import BackupProfileMixin, EventLogModel, WifiSettingModel
Expand Down Expand Up @@ -43,6 +43,10 @@ def __init__(self, parent=None):
# Set up log table
self.logTableWidget.setAlternatingRowColors(True)
header = self.logTableWidget.horizontalHeader()
self.logLink.setText(
f'<a href="file://{config.LOG_DIR}"><span style="text-decoration:'
'underline; color:#0984e3;">Click here</span></a> to view the logs.'
)
header.setVisible(True)
[header.setSectionResizeMode(i, QHeaderView.ResizeMode.ResizeToContents) for i in range(5)]
header.setSectionResizeMode(3, QHeaderView.ResizeMode.Stretch)
Expand Down

0 comments on commit 3c18f86

Please sign in to comment.