From 7f3eadf3a70fda506bd47514c0f98f11ddaa65a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9F=9A=E5=AD=90?= <admin@yzzi.icu>
Date: Mon, 12 Dec 2022 21:47:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/pages/settingspage.cpp | 12 --------
 src/pages/settingspage.ui  | 56 +++++++++++++++++++-------------------
 2 files changed, 28 insertions(+), 40 deletions(-)

diff --git a/src/pages/settingspage.cpp b/src/pages/settingspage.cpp
index 11a0889..deedbe2 100644
--- a/src/pages/settingspage.cpp
+++ b/src/pages/settingspage.cpp
@@ -68,18 +68,6 @@ void SettingsPage::initConfig()
 {
     readServerList();
 
-    // 初始化 apt 源显示
-    QFile aptserver("/etc/apt/sources.list.d/sparkstore.list");
-    aptserver.open(QIODevice::ReadOnly);
-    if(aptserver.isOpen())
-    {
-        ui->label_aptserver->setText(aptserver.readAll());
-    }
-    else
-    {
-        ui->label_aptserver->setText(tr("Not Exist"));
-    }
-    aptserver.close();
     // 读取服务器URL并初始化菜单项的链接
     QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
     if(!readConfig.value("server/choose").toString().isEmpty() && readConfig.value("server/updated").toString() == "TRUE")
diff --git a/src/pages/settingspage.ui b/src/pages/settingspage.ui
index 15953eb..2708fb9 100644
--- a/src/pages/settingspage.ui
+++ b/src/pages/settingspage.ui
@@ -163,33 +163,6 @@
              <item>
               <widget class="QWidget" name="widget_8" native="true">
                <layout class="QGridLayout" name="gridLayout_3">
-                <item row="1" column="0" colspan="4">
-                 <widget class="QLabel" name="label_7">
-                  <property name="styleSheet">
-                   <string notr="true">color:#808080</string>
-                  </property>
-                  <property name="text">
-                   <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check update for Spark Store. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                  </property>
-                  <property name="wordWrap">
-                   <bool>true</bool>
-                  </property>
-                 </widget>
-                </item>
-                <item row="0" column="2">
-                 <widget class="QPushButton" name="pushButton_updateApt">
-                  <property name="text">
-                   <string>Update</string>
-                  </property>
-                 </widget>
-                </item>
-                <item row="0" column="0">
-                 <widget class="QLabel" name="label_6">
-                  <property name="text">
-                   <string>Spark Store Update</string>
-                  </property>
-                 </widget>
-                </item>
                 <item row="0" column="3">
                  <spacer name="horizontalSpacer_4">
                   <property name="orientation">
@@ -203,10 +176,37 @@
                   </property>
                  </spacer>
                 </item>
+                <item row="1" column="0" colspan="4">
+                 <widget class="QLabel" name="label_7">
+                  <property name="styleSheet">
+                   <string notr="true">color:#808080</string>
+                  </property>
+                  <property name="text">
+                   <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check update for Spark Store. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                  </property>
+                  <property name="wordWrap">
+                   <bool>true</bool>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="0">
+                 <widget class="QLabel" name="label_6">
+                  <property name="text">
+                   <string>Spark Store Update</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="2">
+                 <widget class="QPushButton" name="pushButton_updateApt">
+                  <property name="text">
+                   <string>Update</string>
+                  </property>
+                 </widget>
+                </item>
                 <item row="0" column="1">
                  <widget class="QLabel" name="label_aptserver">
                   <property name="text">
-                   <string>Server</string>
+                   <string/>
                   </property>
                  </widget>
                 </item>