Compare commits
459 Commits
ddfbcc5e58
...
2.4.2+76
Author | SHA1 | Date | |
---|---|---|---|
29731728cd | |||
9e8882c580 | |||
6042e57e7a | |||
6235e736b9 | |||
e075804782 | |||
d40a6ca1c4 | |||
5ac657e526 | |||
97ddc18b8e | |||
b835c8edea | |||
288c0399f9 | |||
1478933cf1 | |||
93c6fa6e53 | |||
ce6e9c185a | |||
cdaa8cfe58 | |||
76d8cd943d | |||
d6f3ffc655 | |||
5a6b841253 | |||
cb2de52bee | |||
64e2644745 | |||
56711889ab | |||
4f47cd2c0c | |||
2b61c372f5 | |||
73777fe74e | |||
33a4bd7e71 | |||
17e6b81f76 | |||
22fde6b400 | |||
6e03a00280 | |||
72e6a6a1f6 | |||
66aef44281 | |||
7bb73c80b0 | |||
d043ef2410 | |||
1d0e2f7591 | |||
e9ef28d764 | |||
289aa17a7a | |||
93f41bb523 | |||
09ec9d4a0c | |||
1153fbdeee | |||
e933058338 | |||
ae9743c84f | |||
32bf834108 | |||
1b41c847a6 | |||
b1af6c2c97 | |||
8e76ff3f84 | |||
bd26602299 | |||
52ab1d0d10 | |||
f746e06f65 | |||
d11069a2be | |||
d6dc487d9e | |||
a07c7cdede | |||
acbc125dec | |||
ad0ee971c1 | |||
52d6bb083e | |||
2027eab49b | |||
566ebde1dd | |||
9e039cc532 | |||
c4b95d7084 | |||
a66129a9ba | |||
44e1a8bf67 | |||
efcfd3f57d | |||
84759715a4 | |||
fda09382dd | |||
2c5dd0563a | |||
5bdd8e94fa | |||
2a53031c9a | |||
e8bc7261f3 | |||
997934f680 | |||
26e69d6264 | |||
153eabcbf2 | |||
6d0145c335 | |||
81a79f9476 | |||
537f404fe0 | |||
eb29f76b9a | |||
56816dc060 | |||
899d5f3e5e | |||
c8c455bb57 | |||
5468fc0748 | |||
78516abf2e | |||
0424f98eb5 | |||
2188b8b2e2 | |||
0bf614a75c | |||
9f21f744a4 | |||
b94cda6205 | |||
3c0e4046a4 | |||
338c22a606 | |||
25dd895e0d | |||
ea9ef9e82a | |||
edd86eda77 | |||
671b857a79 | |||
408fd0f35e | |||
30184d08b1 | |||
95f257c47a | |||
41297c6712 | |||
a8e0ade0c8 | |||
3338e699c4 | |||
e07da3efa5 | |||
4f7f015250 | |||
2a4c15d0dc | |||
70ef894ec5 | |||
bb9179d5f9 | |||
e2ecb573a2 | |||
8cb5dff498 | |||
a5629975ed | |||
972b304969 | |||
e8ded55055 | |||
04875eb164 | |||
54a59aa470 | |||
365f330629 | |||
a7829d15b2 | |||
a3868a4281 | |||
1d1d61d60c | |||
03c2491587 | |||
2c1adc988c | |||
c0fbee55e4 | |||
6e544c0b6c | |||
7d56c5ef31 | |||
c2df1af16d | |||
a8143c6453 | |||
04065061e0 | |||
226eb452e5 | |||
a6715b0872 | |||
43e3404dbb | |||
c91cf7c813 | |||
9cd1cad695 | |||
dde280833b | |||
42ac12b53e | |||
63567bf708 | |||
5d3cadefef | |||
251fbb2503 | |||
0b31d32217 | |||
5ddd4fed2e | |||
48b6d5f6c1 | |||
b83b0b5efb | |||
cb24bd953d | |||
4937dee182 | |||
d612097bb1 | |||
058d668b6b | |||
8b19462c3a | |||
0a381ef09b | |||
9b84e912b2 | |||
b3254e0f2f | |||
f0a3bbe023 | |||
df81c84438 | |||
8b12395fca | |||
cb2b71d194 | |||
7ed508e2bb | |||
dad869967e | |||
2d5b3b554e | |||
74882116e3 | |||
a97c3bce3a | |||
1aa70827dc | |||
fe028860e9 | |||
a2d2ce4d38 | |||
167c11b9eb | |||
8cb3933fcc | |||
3818328afe | |||
11627e2455 | |||
3f82c06ff8 | |||
2350f59131 | |||
9fe7c9530a | |||
52f1826e91 | |||
28a4c86dbf | |||
85e48ce03b | |||
efef61a8ea | |||
10ead95af9 | |||
838ee4d55d | |||
13e42429a9 | |||
c6ce3fe2b7 | |||
ae9a7eb0fd | |||
5d6fb2442f | |||
5a85985534 | |||
c80499db03 | |||
b8dcdb2315 | |||
b7b921f1f4 | |||
319d5c7d7f | |||
4b5b001739 | |||
db8871a455 | |||
38dcaa6066 | |||
03275b46ca | |||
cf3b482fef | |||
aa4c04d4ef | |||
73b82f65e4 | |||
9471fe40fe | |||
0d1e18735e | |||
8bb62b5992 | |||
1e8a6dea5b | |||
5c2804cc4d | |||
0dbb8f132a | |||
3395f3dbd0 | |||
d258ba776e | |||
0dcfcaad56 | |||
687e720956 | |||
180876949e | |||
9718965809 | |||
5377161fb0 | |||
963e538ae5 | |||
a355e3bf90 | |||
cb4a2598c8 | |||
950612dc07 | |||
cbd1eaf1af | |||
ac41cbd99f | |||
9f9c90abc4 | |||
87029e3538 | |||
127d9adc09 | |||
c82dc7ad85 | |||
36bcff7a7c | |||
38201b547a | |||
ed0334fcda | |||
fbb486b90b | |||
9b34f385d5 | |||
bb7b731602 | |||
19076f8136 | |||
dc77a936ce | |||
7f58710c6f | |||
068ddcdcdc | |||
f4e9252ca0 | |||
3b1e918117 | |||
ed7981fdaf | |||
9698ca53e4 | |||
ddc1dc7daf | |||
1625a957f8 | |||
2dc50d627e | |||
2ffde9a3dd | |||
5967a91ae1 | |||
32c1effcb5 | |||
9d0e19c56f | |||
acf4e634fe | |||
25942c2338 | |||
a4f81f6ba1 | |||
c1b9090e51 | |||
f494f70003 | |||
fb2a55a909 | |||
4edfa7fd50 | |||
d699cac9b1 | |||
c0428e12c1 | |||
55f434ff05 | |||
f2b3bdda2d | |||
1f6bf33b0e | |||
e2027b1a32 | |||
2b3a58b55e | |||
6ac536412a | |||
52f8ffe4e4 | |||
aca81431aa | |||
1fadd850b7 | |||
ed2a9a21b6 | |||
57279eb3e4 | |||
c403a2914a | |||
bcb176344c | |||
ecf362cffc | |||
f4ab7671d8 | |||
a2a3018917 | |||
0bdb664000 | |||
9c3b61ce57 | |||
d06df3d278 | |||
547ba19e61 | |||
cb05ff2e9e | |||
f614da7918 | |||
a3c8dafff9 | |||
fa978a7cd1 | |||
aaa0a562b4 | |||
590a4ce2a6 | |||
f26edce071 | |||
603799ea32 | |||
a32baf7798 | |||
498c9af663 | |||
202dbff6d3 | |||
96fd64d85d | |||
e236b7f98b | |||
5c7929e618 | |||
7ba5260246 | |||
a6d4947a23 | |||
7fbd4e9647 | |||
95d926b29f | |||
f6cf6d0440 | |||
e503c3f02f | |||
d4fbdd397e | |||
03943a7138 | |||
44f2c5fe0e | |||
bb66d5b684 | |||
1fca36293d | |||
2c7dc8c2ea | |||
cf0df91d8c | |||
91c85e8a58 | |||
2851780dda | |||
00fd58fb97 | |||
ee7d0ddd25 | |||
7656c08832 | |||
619c90cdd9 | |||
168d51c9fe | |||
d4b831f98e | |||
4d96a15c31 | |||
06dd3e092a | |||
82fe9e287a | |||
dc1c285de1 | |||
5a3313e94f | |||
61032c84f1 | |||
36a5b8fb39 | |||
3eda464e03 | |||
7a3ab6fd7d | |||
3d15c0b9f9 | |||
67a29b4305 | |||
594f57e0d3 | |||
d1eb51c596 | |||
85d2eff7f8 | |||
2375c46852 | |||
fd2eb5cda6 | |||
1256f440bd | |||
5b05ca67b6 | |||
95af7140cd | |||
77e9994204 | |||
3f6c186c13 | |||
9ac4a940dd | |||
ec050ab712 | |||
77e3ce8bcc | |||
f5dcf71e10 | |||
7fc18b40db | |||
8c8ab24c9e | |||
a319bd7f8c | |||
6427ec1f82 | |||
35dc7f4392 | |||
b50191970e | |||
1b69e6dd42 | |||
39fb4d474f | |||
392aebcad7 | |||
e9e3a4c474 | |||
7182336a0d | |||
be98fe133d | |||
e458943f56 | |||
eb125fc436 | |||
dc78f39969 | |||
f5c06bc89c | |||
d6d60e60a9 | |||
435b730f3b | |||
73468c5c6d | |||
8db6513eef | |||
65a8f1e6c3 | |||
2671ffad4b | |||
8a628823e0 | |||
94d19a1524 | |||
d98f6c8d18 | |||
6d0f62016a | |||
7e0faba5db | |||
7508a54907 | |||
2eb1f4b52b | |||
00678c0ac8 | |||
abc21f858b | |||
d67e33a41d | |||
4daff41b3e | |||
f92418ea4b | |||
89c912a35b | |||
09ad917e5d | |||
5c377dc0b6 | |||
8bdaf05223 | |||
e920bd954c | |||
e395ac87c5 | |||
026a4dfb27 | |||
df18370bde | |||
80a66136ce | |||
1f8d47f6c3 | |||
b750cc3c67 | |||
b618fcc6da | |||
f763c7515a | |||
c7d5cb48ac | |||
39470d7dbf | |||
4328de21ef | |||
a3a0e8c7a2 | |||
210c73a831 | |||
edaeae386e | |||
be66ea354e | |||
d7c1ffe3cc | |||
240ad7dc7e | |||
bb5fe9c380 | |||
1347aacbc5 | |||
8880647360 | |||
717bccbf3f | |||
018441ea0b | |||
336bb88ca4 | |||
811fc40d79 | |||
e05209ba3c | |||
623095473e | |||
f47f1b175a | |||
3b1d291037 | |||
2abc9808e2 | |||
41dd7d0b64 | |||
20f4e780bc | |||
da43c940f2 | |||
a9ca8d36bc | |||
1980843ac0 | |||
96f6752bbe | |||
04b9427cdf | |||
eab939928f | |||
d3148ab89d | |||
f3b7b02e77 | |||
687db37daf | |||
415446e3bb | |||
0afb6b9c5b | |||
9f4185dff6 | |||
772a33896d | |||
afc49a7a2a | |||
3c621187a7 | |||
3f0a7a2227 | |||
f1dbea190b | |||
893b820e24 | |||
830da43193 | |||
c43cca1aae | |||
49d1d607ce | |||
67feaacf5a | |||
45f61533ee | |||
add904cc41 | |||
e6a9185d11 | |||
669107a99f | |||
4805e68fcd | |||
a693bfdc94 | |||
be9b3f76d2 | |||
ed4fcf9944 | |||
a688e33e33 | |||
62d4806b95 | |||
ed02ba02a8 | |||
efddaf50f2 | |||
d4aaf61091 | |||
fa346b528e | |||
4a9ccc7c7a | |||
76cf08830b | |||
2cbb7fb29e | |||
c55db308a1 | |||
2a837227d5 | |||
b583780cfc | |||
599dd4827b | |||
45f489dcb6 | |||
f16053c475 | |||
c603b3fcb0 | |||
d0a4eeb2b2 | |||
5dd2e83389 | |||
aa44a40e59 | |||
cae4756747 | |||
5fc03e48a1 | |||
06f2c9ecc2 | |||
ac06d35c10 | |||
c5a40702b9 | |||
468b7f2c2e | |||
273c66f5d5 | |||
6d5b690450 | |||
a70092c6f4 | |||
7a617a4f8c | |||
441df4090f | |||
e8384338f8 | |||
b0790ea145 | |||
9588fc0475 | |||
177ff513ee | |||
cf1c4403c1 | |||
23c5a1a23e | |||
32739821ba | |||
000caf4dd2 | |||
fc025c6bd3 | |||
db9f4504db | |||
bb23a12be3 | |||
a865c4d34b | |||
0c2df45337 | |||
a2a42f66a2 | |||
51c7b03ff8 |
87
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
name: Bug report
|
||||||
|
description: Create a report to help us address issues you are facing
|
||||||
|
title: "[Bug] "
|
||||||
|
labels: [Bug]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to make us better!
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
id: duplication
|
||||||
|
attributes:
|
||||||
|
label: ⠀
|
||||||
|
options:
|
||||||
|
- label: This issue is not duplicated with any other open or closed issues
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Describe the bug
|
||||||
|
description: A clear and concise description of what the bug is
|
||||||
|
placeholder: |
|
||||||
|
Example:
|
||||||
|
App crashes on startup every time after changing settings.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: expected
|
||||||
|
attributes:
|
||||||
|
label: Expected behavior
|
||||||
|
description: A clear and concise description of what you expected to happen
|
||||||
|
placeholder: |
|
||||||
|
Example:
|
||||||
|
App started normally, everything worked fine.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reproduce
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
description: Steps to reproduce the bug
|
||||||
|
placeholder: |
|
||||||
|
Example:
|
||||||
|
1. Change "HyperNet Server" to "127.0.1" in "Network" settings
|
||||||
|
2. Restart the app
|
||||||
|
3. Crash
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: environment
|
||||||
|
attributes:
|
||||||
|
label: Device information
|
||||||
|
description: Provide details about your system environment
|
||||||
|
placeholder: |
|
||||||
|
Example:
|
||||||
|
Device: Google Pixel 8 Pro
|
||||||
|
System: Baklava (BP22.250124.009)
|
||||||
|
Version*: 2.3.2
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots
|
||||||
|
description: If applicable, add screenshots to help explain your problem
|
||||||
|
placeholder: |
|
||||||
|
Example:
|
||||||
|
setting_items.jpg
|
||||||
|
crash_screen.jpg
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: additional
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add any other context about the problem here
|
||||||
|
placeholder: |
|
||||||
|
Crash report or other useful informations
|
||||||
|
validations:
|
||||||
|
required: false
|
83
.github/ISSUE_TEMPLATE/bug_report_zh.yaml
vendored
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
name: 问题反馈
|
||||||
|
description: 提交 Bug 或其它问题的反馈
|
||||||
|
title: "[Bug] 标题"
|
||||||
|
labels: [Bug]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
非常感谢,你将要提交的反馈会让我们变得更好!
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
id: duplication
|
||||||
|
attributes:
|
||||||
|
label: ⠀
|
||||||
|
options:
|
||||||
|
- label: 我已经搜索并确认此 issue 不与其它任何 issue 重复
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: 问题描述
|
||||||
|
description: 清楚且详细地描述你遇到的 Bug 或问题
|
||||||
|
placeholder: |
|
||||||
|
发生了什么?生动地描述你所看到的一切
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: expected
|
||||||
|
attributes:
|
||||||
|
label: 期望表现
|
||||||
|
description: 清楚且详细地描述你期望发生的事
|
||||||
|
placeholder: |
|
||||||
|
什么功能应该正常运行,运行后会有什么结果
|
||||||
|
什么界面应该正常显示,应该会显示什么内容
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reproduce
|
||||||
|
attributes:
|
||||||
|
label: 复现步骤
|
||||||
|
description: 能够复现问题的每一步
|
||||||
|
placeholder: |
|
||||||
|
1. 尽可能详细地描述每一步
|
||||||
|
2. 更改的设置、添加的好友...
|
||||||
|
3. 这里也可以描述你看到的界面
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: environment
|
||||||
|
attributes:
|
||||||
|
label: 环境/版本
|
||||||
|
description: 提供运行时的环境信息
|
||||||
|
placeholder: |
|
||||||
|
示例:
|
||||||
|
设备型号: Google Pixel 8 Pro
|
||||||
|
系统板本: Baklava (BP22.250124.009)
|
||||||
|
程序版本: 2.3.2
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: 屏幕截图/录制
|
||||||
|
description: 提供截屏或录屏来更好地描述问题
|
||||||
|
placeholder: |
|
||||||
|
错误显示的界面/崩溃时的界面、先前改动的设置
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: additional
|
||||||
|
attributes:
|
||||||
|
label: 更多信息
|
||||||
|
description: 任何与问题有关且有用的信息
|
||||||
|
placeholder: |
|
||||||
|
崩溃报告、日志,或是你的用户名
|
||||||
|
validations:
|
||||||
|
required: false
|
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: Solsynth Releases
|
||||||
|
url: https://files.solsynth.dev/production01/solian
|
||||||
|
about: Another place to download released apps
|
59
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
name: Feature request
|
||||||
|
description: Suggest features you want to add or suggest to modify existing features
|
||||||
|
title: "[Feature] "
|
||||||
|
labels: [Feature]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to make us better!
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
id: duplication
|
||||||
|
attributes:
|
||||||
|
label: ⠀
|
||||||
|
options:
|
||||||
|
- label: This issue is not duplicated with any other open or closed issues
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Describe the feature
|
||||||
|
description: A clear and concise description of what the feature is
|
||||||
|
placeholder: |
|
||||||
|
Example:
|
||||||
|
A Quick Settings tile to start the service, long press to launch the app.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reasons
|
||||||
|
attributes:
|
||||||
|
label: Reason for adding
|
||||||
|
description: Explain why this feature would be useful to you
|
||||||
|
placeholder: |
|
||||||
|
Example:
|
||||||
|
Start the service quickly from the Quick Settings tile and save lots of time.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: examples
|
||||||
|
attributes:
|
||||||
|
label: Example(s)
|
||||||
|
description: Post screenshots/drawings/links/etc of the feature request, or proof-of-concept images about the feature
|
||||||
|
placeholder: |
|
||||||
|
Example:
|
||||||
|
shazam_toggle.jpg
|
||||||
|
nekobox_switch.jpg
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: additional
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add any other context about the feature here
|
||||||
|
validations:
|
||||||
|
required: false
|
49
.github/ISSUE_TEMPLATE/feature_request_zh.yaml
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: 功能建议
|
||||||
|
description: 提出你想要添加或更改的功能
|
||||||
|
title: "[Feature] 标题"
|
||||||
|
labels: [Feature]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
非常感谢,你将要提交的请求会让我们变得更好!
|
||||||
|
|
||||||
|
- type: checkboxes
|
||||||
|
id: duplication
|
||||||
|
attributes:
|
||||||
|
label: ⠀
|
||||||
|
options:
|
||||||
|
- label: 我已经搜索并确认此 issue 不与其它任何 issue 重复
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: 功能描述
|
||||||
|
description: 清楚且详细地描述要添加/更改后的功能
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reasons
|
||||||
|
attributes:
|
||||||
|
label: 添加/更改理由
|
||||||
|
description: 解释为什么要这样做,对用户有什么好处
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: examples
|
||||||
|
attributes:
|
||||||
|
label: 功能示例
|
||||||
|
description: 相似/已存在功能的截图,或画出大致的界面
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: additional
|
||||||
|
attributes:
|
||||||
|
label: 更多信息
|
||||||
|
description: 任何与功能有关且有用的信息,或已存在功能的代码/仓库
|
||||||
|
validations:
|
||||||
|
required: false
|
24
.github/workflows/nightly.yml
vendored
@ -39,3 +39,27 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: build-output-windows
|
name: build-output-windows
|
||||||
path: build/windows/x64/runner/Release
|
path: build/windows/x64/runner/Release
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: stable
|
||||||
|
cache: true
|
||||||
|
- run: |
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y ninja-build libgtk-3-dev
|
||||||
|
sudo apt-get install libmpv-dev mpv
|
||||||
|
sudo apt-get install libayatana-appindicator3-dev
|
||||||
|
sudo apt-get install keybinder-3.0
|
||||||
|
sudo apt-get install libnotify-dev
|
||||||
|
- run: flutter pub get
|
||||||
|
- run: flutter build linux
|
||||||
|
- name: Archive production artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build-output-linux
|
||||||
|
path: build/linux/x64/release/bundle
|
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"sync": {
|
"sync": {
|
||||||
"region": "solian-next",
|
"region": "solian",
|
||||||
"configPath": "roadsign.toml"
|
"configPath": "roadsign.toml"
|
||||||
},
|
},
|
||||||
"deployments": [
|
"deployments": [
|
||||||
{
|
{
|
||||||
"region": "solian-next",
|
"region": "solian",
|
||||||
"site": "solian-next-web",
|
"site": "solian-web",
|
||||||
"path": "build/web"
|
"path": "build/web"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
31
README.md
@ -1,16 +1,27 @@
|
|||||||
# surface
|
# Solar Network
|
||||||
|
|
||||||
A new Flutter project.
|

|
||||||
|
|
||||||
## Getting Started
|
Hello there! Welcome to the main repository of the HyperNet (also known as the Solar Network). The code here is mainly about the frontend app (also known as Solian). But you can still post issues here to get help and request new features!
|
||||||
|
|
||||||
This project is a starting point for a Flutter application.
|
## Sub Projects
|
||||||
|
|
||||||
A few resources to get you started if this is your first Flutter project:
|
HyperNet, the Solar Network is a microservices project in which the backends are stored in separate repositories. Here is a simple index for it.
|
||||||
|
|
||||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
- The Core, Gateway: [Nexus](https://github.com/Solsynth/HyperNet.Nexus)
|
||||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
- The Auth Service: [Passport](https://github.com/Solsynth/HyperNet.Passport)
|
||||||
|
- The Posting Service: [Interactive](https://github.com/Solsynth/HyperNet.Interactive)
|
||||||
|
- The Messaging Service: [Messaging](https://github.com/Solsynth/HyperNet.Messaging)
|
||||||
|
- The Wallet Service: [Wallet](https://github.com/Solsynth/HyperNet.Wallet)
|
||||||
|
- The Crawler: [Reader](https://github.com/Solsynth/HyperNet.Reader)
|
||||||
|
- Some others may not be listed, you can search in the organization with `HyperNet.` the prefix of all HyperNet projects.
|
||||||
|
|
||||||
For help getting started with Flutter development, view the
|
## Tech Stack
|
||||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
|
||||||
samples, guidance on mobile development, and a full API reference.
|
For those people who want to know the tech stack of this project, the frontend was built by Flutter, which provides the cross-platform ability.
|
||||||
|
|
||||||
|
The backend was built in Go and PostgreSQL with our very own microservice framework included in the nexus.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
The readme will be updated in the future, to be determined. For now, you can check out the link of this repository to learn more on our official website.
|
@ -15,6 +15,7 @@ analyzer:
|
|||||||
- "**/*.freezed.dart"
|
- "**/*.freezed.dart"
|
||||||
errors:
|
errors:
|
||||||
invalid_annotation_target: ignore # Due to freezed + json_serializable issue, ref https://github.com/rrousselGit/freezed/issues/488#issuecomment-894358980
|
invalid_annotation_target: ignore # Due to freezed + json_serializable issue, ref https://github.com/rrousselGit/freezed/issues/488#issuecomment-894358980
|
||||||
|
deprecated_member_use: ignore
|
||||||
|
|
||||||
linter:
|
linter:
|
||||||
# The lint rules applied to this project can be customized in the
|
# The lint rules applied to this project can be customized in the
|
||||||
|
@ -9,14 +9,39 @@ plugins {
|
|||||||
id "dev.flutter.flutter-gradle-plugin"
|
id "dev.flutter.flutter-gradle-plugin"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'com.google.android.material:material:1.12.0'
|
||||||
|
implementation 'androidx.glance:glance:1.1.1'
|
||||||
|
implementation 'androidx.glance:glance-appwidget:1.1.1'
|
||||||
|
implementation 'androidx.compose.foundation:foundation-layout-android:1.7.6'
|
||||||
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||||
|
implementation 'io.coil-kt.coil3:coil-compose:3.0.4'
|
||||||
|
implementation 'io.coil-kt.coil3:coil-network-okhttp:3.0.4'
|
||||||
|
}
|
||||||
|
|
||||||
|
def keystoreProperties = new Properties()
|
||||||
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||||
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
buildFeatures {
|
||||||
|
compose true
|
||||||
|
}
|
||||||
|
|
||||||
namespace = "dev.solsynth.solian"
|
namespace = "dev.solsynth.solian"
|
||||||
compileSdk = flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
ndkVersion = "27.0.12077973"
|
ndkVersion = "27.0.12077973"
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
|
composeOptions {
|
||||||
|
kotlinCompilerExtensionVersion = "1.4.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
@ -24,21 +49,32 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
||||||
applicationId = "dev.solsynth.solian"
|
applicationId = "dev.solsynth.solian"
|
||||||
// You can update the following values to match your application needs.
|
minSdk = 26
|
||||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
|
||||||
minSdk = flutter.minSdkVersion
|
|
||||||
targetSdk = flutter.targetSdkVersion
|
targetSdk = flutter.targetSdkVersion
|
||||||
versionCode = flutter.versionCode
|
versionCode = flutter.versionCode
|
||||||
versionName = flutter.versionName
|
versionName = flutter.versionName
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
keyAlias = keystoreProperties['keyAlias']
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
keyPassword = keystoreProperties['keyPassword']
|
||||||
signingConfig = signingConfigs.debug
|
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||||
|
storePassword = keystoreProperties['storePassword']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
debuggable true
|
||||||
|
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
release {
|
||||||
|
signingConfig = signingConfigs.release
|
||||||
|
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,20 +9,60 @@
|
|||||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
|
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
|
||||||
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="Solian"
|
android:label="Solian"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher">
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:requestLegacyExternalStorage="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="flutterEmbedding"
|
||||||
|
android:value="2" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleInstance"
|
||||||
android:taskAffinity=""
|
android:taskAffinity=""
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
<!-- Widgets Indents -->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="es.antonborri.home_widget.action.LAUNCH" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
<!-- Sharing Intents -->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="text/*" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="image/*" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="image/*" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="video/*" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="video/*" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
the Android process has started. This theme is visible to the user
|
the Android process has started. This theme is visible to the user
|
||||||
while the Flutter UI initializes. After that, this theme continues
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
@ -41,7 +81,30 @@
|
|||||||
<meta-data
|
<meta-data
|
||||||
android:name="flutterEmbedding"
|
android:name="flutterEmbedding"
|
||||||
android:value="2" />
|
android:value="2" />
|
||||||
|
|
||||||
|
<!-- Widgets -->
|
||||||
|
<receiver android:name=".widgets.CheckInWidgetReceiver"
|
||||||
|
android:label="Check In"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
|
</intent-filter>
|
||||||
|
<meta-data
|
||||||
|
android:name="android.appwidget.provider"
|
||||||
|
android:resource="@xml/check_in_widget" />
|
||||||
|
</receiver>
|
||||||
|
<receiver android:name=".widgets.RandomPostWidgetReceiver"
|
||||||
|
android:label="Random Post"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
|
</intent-filter>
|
||||||
|
<meta-data
|
||||||
|
android:name="android.appwidget.provider"
|
||||||
|
android:resource="@xml/random_post_widget" />
|
||||||
|
</receiver>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
<!-- Required to query activities that can process text, see:
|
<!-- Required to query activities that can process text, see:
|
||||||
https://developer.android.com/training/package-visibility and
|
https://developer.android.com/training/package-visibility and
|
||||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
package dev.solsynth.solian.data
|
||||||
|
|
||||||
|
import androidx.annotation.Keep
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class SolarPagination<T>(val count: Int, val data: List<T>)
|
@ -0,0 +1,35 @@
|
|||||||
|
package dev.solsynth.solian.data
|
||||||
|
|
||||||
|
import androidx.annotation.Keep
|
||||||
|
import java.time.Instant
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class SolarPost(
|
||||||
|
val id: Int,
|
||||||
|
val body: SolarPostBody,
|
||||||
|
val publisher: SolarPublisher,
|
||||||
|
val publisherId: Int,
|
||||||
|
val createdAt: Instant,
|
||||||
|
val updatedAt: Instant,
|
||||||
|
val editedAt: Instant?,
|
||||||
|
val publishedAt: Instant?
|
||||||
|
)
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class SolarPostBody(
|
||||||
|
val content: String?,
|
||||||
|
val title: String?,
|
||||||
|
val description: String?,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class SolarPublisher(
|
||||||
|
val id: Int,
|
||||||
|
val name: String,
|
||||||
|
val nick: String,
|
||||||
|
val description: String?,
|
||||||
|
val avatar: String?,
|
||||||
|
val banner: String?,
|
||||||
|
val createdAt: Instant,
|
||||||
|
val updatedAt: Instant
|
||||||
|
)
|
@ -0,0 +1,38 @@
|
|||||||
|
package dev.solsynth.solian.data
|
||||||
|
|
||||||
|
import androidx.annotation.Keep
|
||||||
|
import com.google.gson.JsonDeserializationContext
|
||||||
|
import com.google.gson.JsonDeserializer
|
||||||
|
import com.google.gson.JsonElement
|
||||||
|
import com.google.gson.JsonParseException
|
||||||
|
import com.google.gson.JsonPrimitive
|
||||||
|
import com.google.gson.JsonSerializationContext
|
||||||
|
import com.google.gson.JsonSerializer
|
||||||
|
import java.lang.reflect.Type
|
||||||
|
import java.time.Instant
|
||||||
|
import java.time.format.DateTimeFormatter
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
class InstantAdapter : JsonSerializer<Instant?>,
|
||||||
|
JsonDeserializer<Instant?> {
|
||||||
|
override fun serialize(
|
||||||
|
src: Instant?,
|
||||||
|
typeOfSrc: Type?,
|
||||||
|
context: JsonSerializationContext?
|
||||||
|
): JsonElement {
|
||||||
|
return JsonPrimitive(formatter.format(src))
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(JsonParseException::class)
|
||||||
|
override fun deserialize(
|
||||||
|
json: JsonElement,
|
||||||
|
typeOfT: Type?,
|
||||||
|
context: JsonDeserializationContext?
|
||||||
|
): Instant {
|
||||||
|
return Instant.parse(json.asString)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private val formatter: DateTimeFormatter = DateTimeFormatter.ISO_INSTANT
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package dev.solsynth.solian.data
|
||||||
|
|
||||||
|
import androidx.annotation.Keep
|
||||||
|
import java.time.Instant
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class SolarUser(
|
||||||
|
val id: Int,
|
||||||
|
val name: String,
|
||||||
|
val nick: String
|
||||||
|
)
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class SolarCheckInRecord(
|
||||||
|
val id: Int,
|
||||||
|
val resultTier: Int,
|
||||||
|
val resultExperience: Int,
|
||||||
|
val createdAt: Instant
|
||||||
|
)
|
@ -0,0 +1,128 @@
|
|||||||
|
import android.content.Context
|
||||||
|
import android.net.Uri
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
import androidx.glance.GlanceId
|
||||||
|
import androidx.glance.GlanceModifier
|
||||||
|
import androidx.glance.GlanceTheme
|
||||||
|
import androidx.glance.action.clickable
|
||||||
|
import androidx.glance.appwidget.GlanceAppWidget
|
||||||
|
import androidx.glance.appwidget.provideContent
|
||||||
|
import androidx.glance.background
|
||||||
|
import androidx.glance.currentState
|
||||||
|
import androidx.glance.layout.Alignment
|
||||||
|
import androidx.glance.layout.Column
|
||||||
|
import androidx.glance.layout.Row
|
||||||
|
import androidx.glance.layout.Spacer
|
||||||
|
import androidx.glance.layout.fillMaxHeight
|
||||||
|
import androidx.glance.layout.fillMaxWidth
|
||||||
|
import androidx.glance.layout.height
|
||||||
|
import androidx.glance.layout.padding
|
||||||
|
import androidx.glance.state.GlanceStateDefinition
|
||||||
|
import androidx.glance.text.FontFamily
|
||||||
|
import androidx.glance.text.Text
|
||||||
|
import androidx.glance.text.TextStyle
|
||||||
|
import com.google.gson.FieldNamingPolicy
|
||||||
|
import com.google.gson.GsonBuilder
|
||||||
|
import dev.solsynth.solian.MainActivity
|
||||||
|
import dev.solsynth.solian.data.InstantAdapter
|
||||||
|
import dev.solsynth.solian.data.SolarCheckInRecord
|
||||||
|
import es.antonborri.home_widget.actionStartActivity
|
||||||
|
import java.time.Instant
|
||||||
|
import java.time.LocalDate
|
||||||
|
import java.time.OffsetDateTime
|
||||||
|
import java.time.ZoneId
|
||||||
|
import java.time.format.DateTimeFormatter
|
||||||
|
|
||||||
|
class CheckInWidget : GlanceAppWidget() {
|
||||||
|
override val stateDefinition: GlanceStateDefinition<*>?
|
||||||
|
get() = HomeWidgetGlanceStateDefinition()
|
||||||
|
|
||||||
|
override suspend fun provideGlance(context: Context, id: GlanceId) {
|
||||||
|
provideContent {
|
||||||
|
GlanceTheme {
|
||||||
|
GlanceContent(context, currentState())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun GlanceContent(context: Context, currentState: HomeWidgetGlanceState) {
|
||||||
|
val gson =
|
||||||
|
GsonBuilder()
|
||||||
|
.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
|
||||||
|
.registerTypeAdapter(Instant::class.java, InstantAdapter())
|
||||||
|
.create()
|
||||||
|
val resultTierSymbols = listOf("Bad", "Poor", "Medium", "Good", "Great")
|
||||||
|
|
||||||
|
val prefs = currentState.preferences
|
||||||
|
val checkInRaw: String? = prefs.getString("pas_check_in_record", null)
|
||||||
|
|
||||||
|
val checkIn: SolarCheckInRecord? =
|
||||||
|
checkInRaw?.let { checkInRaw ->
|
||||||
|
gson.fromJson(checkInRaw, SolarCheckInRecord::class.java)
|
||||||
|
} ?: null;
|
||||||
|
|
||||||
|
Column(
|
||||||
|
modifier = GlanceModifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.fillMaxHeight()
|
||||||
|
.background(GlanceTheme.colors.widgetBackground)
|
||||||
|
.padding(16.dp)
|
||||||
|
.clickable(
|
||||||
|
onClick = actionStartActivity<MainActivity>(
|
||||||
|
context,
|
||||||
|
Uri.parse("https://sn.solsynth.dev")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
if (checkIn != null) {
|
||||||
|
val dateFormatter = DateTimeFormatter.ofPattern("EEE, MM/dd")
|
||||||
|
|
||||||
|
val checkDate = checkIn.createdAt.atZone(ZoneId.of("UTC")).toLocalDate()
|
||||||
|
val currentDate = LocalDate.now()
|
||||||
|
if (checkDate.isEqual(currentDate)) {
|
||||||
|
Column {
|
||||||
|
Text(
|
||||||
|
text = resultTierSymbols[checkIn.resultTier],
|
||||||
|
style = TextStyle(
|
||||||
|
fontSize = 17.sp,
|
||||||
|
color = GlanceTheme.colors.onSurface
|
||||||
|
)
|
||||||
|
)
|
||||||
|
Text(
|
||||||
|
text = "+${checkIn.resultExperience} EXP",
|
||||||
|
style = TextStyle(
|
||||||
|
fontSize = 13.sp,
|
||||||
|
fontFamily = FontFamily.Monospace,
|
||||||
|
color = GlanceTheme.colors.onSurface
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Spacer(modifier = GlanceModifier.height(8.dp))
|
||||||
|
Row(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
|
Text(
|
||||||
|
text = OffsetDateTime.ofInstant(
|
||||||
|
checkIn.createdAt,
|
||||||
|
ZoneId.systemDefault()
|
||||||
|
)
|
||||||
|
.format(dateFormatter),
|
||||||
|
style = TextStyle(
|
||||||
|
fontSize = 11.sp,
|
||||||
|
color = GlanceTheme.colors.onSurface
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return@Column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = "You haven't divined today",
|
||||||
|
style = TextStyle(fontSize = 15.sp, color = GlanceTheme.colors.onSurface)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package dev.solsynth.solian.widgets
|
||||||
|
|
||||||
|
import CheckInWidget
|
||||||
|
import HomeWidgetGlanceWidgetReceiver
|
||||||
|
|
||||||
|
class CheckInWidgetReceiver : HomeWidgetGlanceWidgetReceiver<CheckInWidget>() {
|
||||||
|
override val glanceAppWidget = CheckInWidget()
|
||||||
|
}
|
@ -0,0 +1,168 @@
|
|||||||
|
import HomeWidgetGlanceState
|
||||||
|
import HomeWidgetGlanceStateDefinition
|
||||||
|
import android.content.Context
|
||||||
|
import android.net.Uri
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
import androidx.glance.GlanceId
|
||||||
|
import androidx.glance.GlanceModifier
|
||||||
|
import androidx.glance.GlanceTheme
|
||||||
|
import androidx.glance.action.clickable
|
||||||
|
import androidx.glance.appwidget.GlanceAppWidget
|
||||||
|
import androidx.glance.appwidget.provideContent
|
||||||
|
import androidx.glance.background
|
||||||
|
import androidx.glance.currentState
|
||||||
|
import androidx.glance.layout.Alignment
|
||||||
|
import androidx.glance.layout.Column
|
||||||
|
import androidx.glance.layout.Row
|
||||||
|
import androidx.glance.layout.Spacer
|
||||||
|
import androidx.glance.layout.fillMaxHeight
|
||||||
|
import androidx.glance.layout.fillMaxSize
|
||||||
|
import androidx.glance.layout.fillMaxWidth
|
||||||
|
import androidx.glance.layout.height
|
||||||
|
import androidx.glance.layout.padding
|
||||||
|
import androidx.glance.layout.width
|
||||||
|
import androidx.glance.state.GlanceStateDefinition
|
||||||
|
import androidx.glance.text.FontFamily
|
||||||
|
import androidx.glance.text.FontWeight
|
||||||
|
import androidx.glance.text.Text
|
||||||
|
import androidx.glance.text.TextStyle
|
||||||
|
import com.google.gson.FieldNamingPolicy
|
||||||
|
import com.google.gson.GsonBuilder
|
||||||
|
import dev.solsynth.solian.MainActivity
|
||||||
|
import dev.solsynth.solian.data.InstantAdapter
|
||||||
|
import dev.solsynth.solian.data.SolarPost
|
||||||
|
import es.antonborri.home_widget.actionStartActivity
|
||||||
|
import java.time.Instant
|
||||||
|
import java.time.LocalDateTime
|
||||||
|
import java.time.ZoneId
|
||||||
|
import java.time.format.DateTimeFormatter
|
||||||
|
|
||||||
|
class RandomPostWidget : GlanceAppWidget() {
|
||||||
|
override val stateDefinition: GlanceStateDefinition<*>?
|
||||||
|
get() = HomeWidgetGlanceStateDefinition()
|
||||||
|
|
||||||
|
override suspend fun provideGlance(context: Context, id: GlanceId) {
|
||||||
|
provideContent {
|
||||||
|
GlanceTheme {
|
||||||
|
GlanceContent(context, currentState())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun GlanceContent(
|
||||||
|
context: Context,
|
||||||
|
currentState: HomeWidgetGlanceState,
|
||||||
|
) {
|
||||||
|
val prefs = currentState.preferences
|
||||||
|
val postRaw = prefs.getString("int_random_post", null)
|
||||||
|
|
||||||
|
val gson =
|
||||||
|
GsonBuilder()
|
||||||
|
.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
|
||||||
|
.registerTypeAdapter(Instant::class.java, InstantAdapter())
|
||||||
|
.create()
|
||||||
|
|
||||||
|
val data: SolarPost? = postRaw?.let { postRaw ->
|
||||||
|
gson.fromJson(postRaw, SolarPost::class.java)
|
||||||
|
} ?: null;
|
||||||
|
|
||||||
|
Column(
|
||||||
|
modifier = GlanceModifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.fillMaxHeight()
|
||||||
|
.background(GlanceTheme.colors.widgetBackground)
|
||||||
|
.padding(16.dp)
|
||||||
|
.clickable(
|
||||||
|
onClick = actionStartActivity<MainActivity>(
|
||||||
|
context,
|
||||||
|
Uri.parse("https://sn.solsynth.dev/posts/${data!!.id}")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
if (data != null) {
|
||||||
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
|
Text(
|
||||||
|
text = data.publisher.nick,
|
||||||
|
style = TextStyle(fontSize = 15.sp, color = GlanceTheme.colors.onSurface)
|
||||||
|
)
|
||||||
|
Spacer(modifier = GlanceModifier.width(8.dp))
|
||||||
|
Text(
|
||||||
|
text = "@${data.publisher.name}",
|
||||||
|
style = TextStyle(
|
||||||
|
fontSize = 13.sp,
|
||||||
|
fontFamily = FontFamily.Monospace,
|
||||||
|
color = GlanceTheme.colors.onSurface
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = GlanceModifier.height(8.dp))
|
||||||
|
|
||||||
|
if (data.body.title != null) {
|
||||||
|
Text(
|
||||||
|
text = data.body.title,
|
||||||
|
style = TextStyle(fontSize = 19.sp, color = GlanceTheme.colors.onSurface)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (data.body.description != null) {
|
||||||
|
Text(
|
||||||
|
text = data.body.description,
|
||||||
|
style = TextStyle(fontSize = 17.sp, color = GlanceTheme.colors.onSurface)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.body.title != null || data.body.description != null) {
|
||||||
|
Spacer(modifier = GlanceModifier.height(8.dp))
|
||||||
|
}
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = data.body.content ?: "No content",
|
||||||
|
style = TextStyle(fontSize = 15.sp, color = GlanceTheme.colors.onSurface),
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = GlanceModifier.height(8.dp))
|
||||||
|
|
||||||
|
|
||||||
|
Text(
|
||||||
|
LocalDateTime.ofInstant(data.createdAt, ZoneId.systemDefault())
|
||||||
|
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")),
|
||||||
|
style = TextStyle(fontSize = 13.sp, color = GlanceTheme.colors.onSurface),
|
||||||
|
)
|
||||||
|
|
||||||
|
Text(
|
||||||
|
"#${data.id}",
|
||||||
|
style = TextStyle(
|
||||||
|
fontSize = 11.sp,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
color = GlanceTheme.colors.onSurface
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
return@Column;
|
||||||
|
}
|
||||||
|
|
||||||
|
Column(
|
||||||
|
modifier = GlanceModifier.fillMaxSize(),
|
||||||
|
verticalAlignment = Alignment.Vertical.CenterVertically,
|
||||||
|
horizontalAlignment = Alignment.Horizontal.CenterHorizontally
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
text = "No Recommendations",
|
||||||
|
style = TextStyle(
|
||||||
|
fontSize = 17.sp,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
color = GlanceTheme.colors.onSurface
|
||||||
|
)
|
||||||
|
)
|
||||||
|
Text(
|
||||||
|
text = "Open app to load some posts",
|
||||||
|
style = TextStyle(fontSize = 15.sp, color = GlanceTheme.colors.onSurface)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package dev.solsynth.solian.widgets
|
||||||
|
|
||||||
|
import RandomPostWidget
|
||||||
|
import HomeWidgetGlanceWidgetReceiver
|
||||||
|
|
||||||
|
class RandomPostWidgetReceiver : HomeWidgetGlanceWidgetReceiver<RandomPostWidget>() {
|
||||||
|
override val glanceAppWidget = RandomPostWidget()
|
||||||
|
}
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 736 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.5 KiB |
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
|
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
@ -1,3 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
</adaptive-icon>
|
|
Before Width: | Height: | Size: 1.5 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 952 B |
Before Width: | Height: | Size: 3.7 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 872 B |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1017 B |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 644 B |
Before Width: | Height: | Size: 2.4 KiB |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 594 B |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 4.4 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 2.4 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 4.8 KiB |
@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="ic_launcher_background">#FFFFFFFF</color>
|
<color name="ic_launcher_background">#FFFFFFFF</color>
|
||||||
|
<color name="ic_notification_background">#00000000</color>
|
||||||
</resources>
|
</resources>
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
<style name="LaunchTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||||
<!-- Show a splash screen on the activity. Automatically removed when
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
the Flutter engine draws its first frame -->
|
the Flutter engine draws its first frame -->
|
||||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||