From f2876aef0afb0eb1c37bb3a5b7496c7890e4fc6c Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Sat, 9 Nov 2024 22:39:36 +0900 Subject: [PATCH] =?UTF-8?q?pc=5Flist=E3=83=86=E3=83=BC=E3=83=96=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker_auth.py | 10 +++++----- resource/css/admin.css | 20 +++++++++++++++++++- templates/pc_list.html | 1 + 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/dislocker_auth.py b/dislocker_auth.py index 1930f35..b5139bd 100644 --- a/dislocker_auth.py +++ b/dislocker_auth.py @@ -494,19 +494,19 @@ def admin(): @app.route('/admin/pc_list') def admin_pclist(): - table = '' + table = '
PC番号ニックネームマスターパスワード
' pc_list = auth.get_pc_list() for i in pc_list: pc_number = i[0] alt_name = i[1] if alt_name == None: - alt_name = '--未登録--' + alt_name = '-ニックネーム未登録-' master_password = i[2] if master_password == None: - master_password = '--未登録--' - - table += f'' + pass + else: + table += f'' table += '
PC番号ニックネームマスターパスワード
{pc_number}{alt_name}{master_password}
{pc_number}{alt_name}{master_password}
' diff --git a/resource/css/admin.css b/resource/css/admin.css index 25865dd..8d2538a 100644 --- a/resource/css/admin.css +++ b/resource/css/admin.css @@ -1,5 +1,4 @@ #sidebar { - height: 100%; width: 30%; background-color: aliceblue; @@ -10,4 +9,23 @@ #general { display: flex; float: left; +} + +#pc_list_table { + width: 50%; + table-layout: fixed; + border-collapse: collapse; + border: 2px solid; +} + +th { + padding: 2px; + border-collapse: collapse; + border: 2px solid; +} + +td { + padding: 8px; + border-collapse: collapse; + border: 2px solid; } \ No newline at end of file diff --git a/templates/pc_list.html b/templates/pc_list.html index d319eba..ae4432a 100644 --- a/templates/pc_list.html +++ b/templates/pc_list.html @@ -16,6 +16,7 @@

PCリストあるよ(笑)

+

登録されたPCのみが表示されています。

{{pc_list_table | safe}}