Last active 1729664260

Revision a9987ded8bb95a7d0dcc99c216759e7654119588

gistfile1.txt Raw
1import QtQuick 1.0
2import QtQuick.Controls 1.0
3import MeeGo 1.0
4
5ApplicationWindow {
6 id: appWindow
7 visible: true
8 width: 400
9 height: 600
10
11 property string instanceUrl: "https://cmx-im.000010086.xyz"
12 property variant timelineData: [] // 使用 variant 来存储时间线数据
13
14 PageStack {
15 id: pageStack
16 anchors.fill: parent
17
18 Page {
19 id: previewPage
20 anchors.fill: parent
21 color: "lightgray"
22
23 Column {
24 anchors.fill: parent
25 spacing: 10
26
27 Text {
28 text: "Public Timeline of " + appWindow.instanceUrl
29 font.bold: true
30 anchors.horizontalCenter: parent.horizontalCenter
31 }
32
33 // 显示时间线内容
34 ListView {
35 id: timelineView
36 anchors.fill: parent
37 model: appWindow.timelineData
38
39 delegate: Item {
40 width: timelineView.width
41 height: 50
42
43 Text {
44 text: modelData
45 anchors.verticalCenter: parent.verticalCenter
46 }
47 }
48 }
49
50 Row {
51 anchors.horizontalCenter: parent.horizontalCenter
52 spacing: 10
53
54 Button {
55 text: "Login"
56 onClicked: {
57 // 跳转到登录页面 (未实现)
58 }
59 }
60
61 Button {
62 text: "Change Instance"
63 onClicked: {
64 // 在这里可以实现切换实例地址的逻辑
65 }
66 }
67 }
68 }
69 }
70 }
71}
72

Powered by Opengist Load: 68ms