update 2023-12-23 23:35:21

This commit is contained in:
github-actions[bot] 2023-12-23 23:35:21 +08:00
parent df9c7d8cef
commit 617a7ce4a5
6 changed files with 116 additions and 243 deletions

View File

@ -54,6 +54,7 @@ case "$1" in
fi fi
if mv "$tmp_path" "$bg_path/$newname" 2>"/dev/null"; then if mv "$tmp_path" "$bg_path/$newname" 2>"/dev/null"; then
chmod 0644 "$bg_path/$newname"
echo '{ "result": 0 }' echo '{ "result": 0 }'
else else
echo '{ "result": 1 }' echo '{ "result": 1 }'

View File

@ -56,7 +56,7 @@ It also supports automatic and manual switching between light and dark modes.
[Contributors](#contributors) • [Contributors](#contributors) •
[Credits](#credits) [Credits](#credits)
<img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon4.gif"> <img src="https://raw.githubusercontent.com/jerrykuku/staff/master/argon2.gif">
</div> </div>
## Key Features ## Key Features

File diff suppressed because one or more lines are too long

View File

@ -118,6 +118,7 @@ body {
textarea { textarea {
padding: 0.2rem; padding: 0.2rem;
&:focus-visible { &:focus-visible {
outline: none; outline: none;
border: 1px solid var(--primary); border: 1px solid var(--primary);
@ -377,7 +378,7 @@ h2 {
letter-spacing: 0.1rem; letter-spacing: 0.1rem;
padding: 1rem 1.25rem; padding: 1rem 1.25rem;
color: #32325d; color: #32325d;
border-radius: .25rem; border-radius: .375rem;
background: #fff; background: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, .03); box-shadow: 0 4px 8px rgba(0, 0, 0, .03);
font-weight: bold; font-weight: bold;
@ -394,7 +395,7 @@ h3 {
padding: 0.8755rem 1.25rem; padding: 0.8755rem 1.25rem;
color: #32325d; color: #32325d;
color: var(--gray-dark); color: var(--gray-dark);
border-radius: .25rem; border-radius: .375rem;
background: #fff; background: #fff;
font-weight: bold; font-weight: bold;
} }
@ -402,7 +403,7 @@ h3 {
h4 { h4 {
margin: 0; margin: 0;
padding: 0.75rem 1.25rem; padding: 0.75rem 1.25rem;
font-size: 0.875rem; font-size: 0.7rem;
font-weight: 600; font-weight: 600;
color: #525f7f; color: #525f7f;
font-weight: bold; font-weight: bold;
@ -707,7 +708,7 @@ header,
footer { footer {
font-size: .875rem; font-size: .8rem;
overflow: hidden; overflow: hidden;
padding: 1rem; padding: 1rem;
text-align: right; text-align: right;
@ -809,41 +810,6 @@ small {
margin: 0 1.25rem 1rem 1.25rem; margin: 0 1.25rem 1rem 1.25rem;
flex-grow: 1; flex-grow: 1;
} }
.Dashboard {
color: var(--gray-dark) !important;
h3 {
color: var(--gray-dark);
}
p {
margin-bottom: 3px;
margin-top: 3px;
}
hr {
border-top: 1px solid rgba(0, 0, 0, 1);
}
.dashboard-bg {
background-color: #fff;
}
.settings-info {
padding-top: 1em;
padding-bottom: 1em;
p span:nth-child(2) {
max-height: 18.5px;
top: 4px;
}
.label {
font-size: .7rem;
padding: 0.2rem 0.6rem;
}
}
}
} }
} }
@ -918,7 +884,7 @@ header {
.status { .status {
span { span {
display: inline-block; display: inline-block;
font-size: 0.875rem; font-size: 0.8rem;
font-weight: bold; font-weight: bold;
padding: 0.3rem 0.8rem; padding: 0.3rem 0.8rem;
white-space: nowrap; white-space: nowrap;
@ -1000,7 +966,7 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
margin-right: 1.25rem; margin-right: 1.25rem;
padding: 1rem 1.25rem; padding: 1rem 1.25rem;
border: 0; border: 0;
border-radius: 0.25rem !important; border-radius: 0.375rem !important;
background-color: #fff; background-color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12); box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
text-shadow: 1px 1px rgba(0, 0, 0, .1); text-shadow: 1px 1px rgba(0, 0, 0, .1);
@ -1056,7 +1022,7 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
display: block; display: block;
margin: 0.1rem .5rem 0.1rem .5rem; margin: 0.1rem .5rem 0.1rem .5rem;
padding: .675rem 0 .675rem 2.5rem; padding: .675rem 0 .675rem 2.5rem;
border-radius: .25rem; border-radius: .375rem;
text-decoration: none; text-decoration: none;
cursor: default; cursor: default;
font-size: 1rem; font-size: 1rem;
@ -1147,7 +1113,7 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
li { li {
position: relative; position: relative;
border-radius: 0.25rem; border-radius: 0.375rem;
margin: 0; margin: 0;
background: none; background: none;
list-style: none; list-style: none;
@ -1219,7 +1185,7 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
display: block; display: block;
margin: 0.1rem .5rem 0.1rem .5rem; margin: 0.1rem .5rem 0.1rem .5rem;
padding: .675rem 0 .675rem 2.5rem; padding: .675rem 0 .675rem 2.5rem;
border-radius: .25rem; border-radius: .375rem;
text-decoration: none; text-decoration: none;
cursor: default; cursor: default;
font-size: 1rem; font-size: 1rem;
@ -1349,8 +1315,8 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
color: #fb6340; color: #fb6340;
} }
a[data-title=Log_out], a[data-title=Logout],
.food[data-title=Log_out] { .food[data-title=Logout] {
&::before { &::before {
content: "\e907"; content: "\e907";
color: #adb5bd; color: #adb5bd;
@ -1371,7 +1337,7 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
display: block; display: block;
margin: 0.8rem .5rem 0.1rem 0.5rem; margin: 0.8rem .5rem 0.1rem 0.5rem;
padding: .675rem 0 .675rem 2.5rem; padding: .675rem 0 .675rem 2.5rem;
border-radius: .25rem; border-radius: .375rem;
text-decoration: none; text-decoration: none;
font-size: 1rem; font-size: 1rem;
transition: all 0.2s; transition: all 0.2s;
@ -1432,7 +1398,7 @@ body[class*="node-"]>.main>.main-left>.nav>.slide>.menu.active::before {
padding: 0; padding: 0;
border: 0; border: 0;
border-radius: 0.25rem; border-radius: 0.375rem;
background-color: #fff; background-color: #fff;
box-shadow: 0 0 1rem 0 rgba(136, 152, 170, .15); box-shadow: 0 0 1rem 0 rgba(136, 152, 170, .15);
@ -1714,7 +1680,7 @@ td>table>tbody>tr>td,
white-space: nowrap; white-space: nowrap;
text-decoration: none; text-decoration: none;
border: 0; border: 0;
border-radius: .25rem; border-radius: .2rem;
background-color: #f0f0f0; background-color: #f0f0f0;
background-image: none; background-image: none;
appearance: none; appearance: none;
@ -1738,12 +1704,9 @@ td>table>tbody>tr>td,
} }
} }
.btn:not(button) ul:not(.dropdown) li{
padding: 0;
}
.cbi-button-up, .cbi-button-up,
.cbi-button-down { .cbi-button-down {
font-size: 1.2rem;
display: inline-block; display: inline-block;
min-width: 0; min-width: 0;
padding: .2rem 1rem; padding: .2rem 1rem;
@ -1927,7 +1890,7 @@ td>table>tbody>tr>td,
margin: 0 0 1rem 0; margin: 0 0 1rem 0;
padding: 0 1rem; padding: 0 1rem;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 0.25rem; border-radius: 0.375rem;
box-shadow: 0 4px 8px rgba(0, 0, 0, .03); box-shadow: 0 4px 8px rgba(0, 0, 0, .03);
white-space: nowrap; white-space: nowrap;
overflow-x: auto; overflow-x: auto;
@ -2097,7 +2060,7 @@ td>table>tbody>tr>td,
margin-top: 0; margin-top: 0;
padding: 0; padding: 0;
border: 0 solid #d4d4d4; border: 0 solid #d4d4d4;
border-radius: 0.25rem; border-radius: 0.375rem;
} }
.cbi-tabcontainer>.cbi-value:nth-of-type(2n) { .cbi-tabcontainer>.cbi-value:nth-of-type(2n) {
@ -2157,8 +2120,7 @@ td>table>tbody>tr>td,
.cbi-value-field .cbi-dropdown, .cbi-value-field .cbi-dropdown,
.cbi-value-field .cbi-input-select, .cbi-value-field .cbi-input-select,
.cbi-value input[type="text"], .cbi-value input[type="text"],
.cbi-value input[type="password"], .cbi-value input[type="password"] {
.cbi-value textarea{
min-width: 18rem; min-width: 18rem;
} }
@ -2585,11 +2547,10 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
border: 0 solid #918e8c; border: 0 solid #918e8c;
background: #ffffff; background: #ffffff;
box-shadow: 0 0 4px #918e8c; box-shadow: 0 0 4px #918e8c;
border-bottom-left-radius: 0.25rem; border-bottom-left-radius: 0.35rem;
border-bottom-right-radius: 0.25rem; border-bottom-right-radius: 0.35rem;
color: var(--main-menu-color); color: var(--main-menu-color);
margin-left: -0 !important; margin-left: -0.55rem !important;
left: 0;
li { li {
color: #000; color: #000;
@ -2725,7 +2686,7 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
min-height: 32px; min-height: 32px;
margin: 5em auto; margin: 5em auto;
padding: 1rem; padding: 1rem;
border-radius: 0.25rem !important; border-radius: 0.375rem !important;
background: #fff; background: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12); box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
@ -2759,7 +2720,7 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
margin: -1rem -1rem 0 -1rem; margin: -1rem -1rem 0 -1rem;
font-size: 1rem; font-size: 1rem;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
border-radius: 0.25rem 0 0 0.25rem; border-radius: 0.375rem 0 0 0.375rem;
} }
h5 { h5 {
@ -2844,7 +2805,7 @@ body.modal-overlay-active #modal_overlay {
} }
#view { #view {
border-radius: 0.25rem; border-radius: 0.375rem;
overflow: hidden; overflow: hidden;
&>.spinning { &>.spinning {
@ -2923,7 +2884,7 @@ body.modal-overlay-active #modal_overlay {
td>.ifacebadge, td>.ifacebadge,
.td>.ifacebadge { .td>.ifacebadge {
font-size: .875rem; font-size: .8rem;
background-color: #f0f0f0; background-color: #f0f0f0;
} }
@ -2943,7 +2904,7 @@ td>.ifacebadge,
.ifacebox { .ifacebox {
flex-grow: 1; flex-grow: 1;
border-radius: .25rem; border-radius: .375rem;
overflow: hidden; overflow: hidden;
margin: 1rem; margin: 1rem;
} }
@ -2983,15 +2944,13 @@ td>.ifacebadge,
/* textarea */ /* textarea */
.cbi-input-textarea { .cbi-input-textarea {
font-family: inherit; font-family: monospace;
width: 100%; width: 100%;
font-size: 0.875rem; font-size: 0.875rem;
min-height: 14rem; min-height: 14rem;
padding: .8rem; padding: .8rem;
color: #8898aa; color: #000;
border-radius: 0.25rem; border-radius: 0.375rem;
border:1px solid #dee2e6;
min-width: 16rem;
} }
#content_syslog { #content_syslog {
@ -3008,7 +2967,7 @@ td>.ifacebadge,
resize: none; resize: none;
color: #242424; color: #242424;
border: 0; border: 0;
border-radius: 0.25rem; border-radius: 0.375rem;
background-color: #ffffff; background-color: #ffffff;
} }
@ -3019,7 +2978,7 @@ td>.ifacebadge,
/* config changes */ /* config changes */
.uci-change-list { .uci-change-list {
font-family: inherit; font-family: monospace;
overflow: scroll; overflow: scroll;
width: 100%; width: 100%;
display: flex; display: flex;
@ -3340,30 +3299,8 @@ label[data-index][data-depends] {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12); box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
} }
[data-page="admin-network-diagnostics"] { [data-page="admin-network-diagnostics"] .table {
.table { box-shadow: none;
box-shadow: none;
}
.cbi-section {
padding: 1rem;
font-family: monospace;
background: #fff !important;
}
textarea {
background: transparent;
border-radius: 0.25rem;
font-family: inherit !important;
color: #8898aa;
border: 1px solid #dee2e6;
padding: 0.5rem;
}
.tr > .td {
background-color: #fff !important;
border-bottom: 1px solid #dee2e6 !important;
}
} }
input[name="ping"], input[name="ping"],
@ -3372,44 +3309,34 @@ input[name="nslookup"] {
width: 80%; width: 80%;
} }
/* fix status */ /* fix status */
.node-status-overview>.main fieldset:nth-child(4) .td:nth-child(2), .node-status-overview>.main fieldset:nth-child(4) .td:nth-child(2),
.node-status-processes>.main .table .tr .td:nth-child(3) { .node-status-processes>.main .table .tr .td:nth-child(3) {
white-space: normal; white-space: normal;
} }
div[style*="display:grid;grid-template-columns:repeat"] {
display: flex !important;
justify-content: space-evenly !important;
padding-bottom: 1rem;
.ifacebox {
text-align: center;
}
}
[data-page="admin-system-attendedsysupgrade"] #view .cbi-button { [data-page="admin-system-attendedsysupgrade"] #view .cbi-button {
margin-left: 0 !important; margin-left: 0 !important;
margin-top: 1rem !important; margin-top: 1rem !important;
} }
/* fix system reboot */ /* fix system reboot */
[data-page="admin-system-reboot"] { [data-page="admin-system-reboot"] p {
p { padding-left: 1.5rem;
padding-left: 1.5rem; }
}
p > span { [data-page="admin-system-reboot"] .cbi-button {
position: relative; background: #fb6340 !important;
top: .1rem; border-color: #fb6340 !important;
left: 1rem; margin-left: 0 !important;
} }
.cbi-button { [data-page="admin-system-reboot"] p>span {
background: #fb6340 !important; position: relative;
border-color: #fb6340 !important; top: .1rem;
margin-left: 0 !important; left: 1rem;
}
} }
[data-page="admin-vpn-passwall"] h4 { [data-page="admin-vpn-passwall"] h4 {
@ -3429,15 +3356,13 @@ div[style*="display:grid;grid-template-columns:repeat"] {
} }
/* samba */ /* samba */
#cbi-samba [data-tab="template"] { #cbi-samba [data-tab="template"] .cbi-value-field {
.cbi-value-field { display: block;
display: block; }
}
.cbi-value-title { #cbi-samba [data-tab="template"] .cbi-value-title {
width: auto; width: auto;
padding-bottom: .6rem; padding-bottom: .6rem;
}
} }
/* admin-system-admin-password */ /* admin-system-admin-password */
@ -3535,9 +3460,9 @@ div[style*="display:grid;grid-template-columns:repeat"] {
min-height: 15rem; min-height: 15rem;
padding: 1rem; padding: 1rem;
resize: none; resize: none;
color: #8898aa; color: #242424;
border-radius: 0.25rem; border-radius: 0.375rem;
border: 1px solid #dee2e6; background-color: #ffffff;
&:focus-visible { &:focus-visible {
outline: none; outline: none;
@ -3563,12 +3488,12 @@ div[style*="display:grid;grid-template-columns:repeat"] {
min-height: 15rem; min-height: 15rem;
padding: 1rem; padding: 1rem;
resize: none; resize: none;
color: #242424;
border-radius: 0.375rem;
background-color: transparent; background-color: transparent;
background: var(--white); background: var(--white);
outline: none; outline: none;
color: #8898aa; border-radius: 0.375rem;
border-radius: 0.25rem;
border:1px solid #dee2e6;
} }
} }
} }
@ -3596,7 +3521,7 @@ div[style*="display:grid;grid-template-columns:repeat"] {
} }
.cbi-map-tabbed { .cbi-map-tabbed {
border-radius: 0.25rem; border-radius: 0.375rem;
} }
.cbi-section-node { .cbi-section-node {
@ -3634,7 +3559,7 @@ div[style*="display:grid;grid-template-columns:repeat"] {
label>input[type="checkbox"] { label>input[type="checkbox"] {
top: -0.25rem; top: -0.35rem;
} }
.btn { .btn {
@ -3731,12 +3656,12 @@ div[style*="display:grid;grid-template-columns:repeat"] {
textarea { textarea {
padding: 1rem; padding: 1rem;
border-radius: 0.25rem; border-radius: 0.375rem;
} }
} }
&>h3 { &>h3 {
border-radius: 0.25rem 0.25rem 0 0; border-radius: 0.375rem 0.375rem 0 0;
} }
} }
@ -3878,90 +3803,6 @@ pre.command-output {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
[data-page="admin-services-ttyd"] .container {
display: flex;
flex-direction: column;
}
[data-page="admin-services-ttyd"] #view {
flex: 1;
}
[data-page="admin-services-ttyd"] #view iframe {
height: 100%;
}
[data-page="admin-system-fileassistant"] {
.fb-container .panel-title {
padding: .5rem .75rem !important;
}
.cbi-section.fb-container{
padding: 0.5rem;
}
.fb-container .panel-container {
border-bottom-color: #dee2e6;
}
}
[data-page^="admin-services-openclash"] {
.cbi-tabmenu > li {
border-right: none !important;
margin: 0 0.4rem 0 0 !important;
&:last-child {
margin-right: 0 !important;
}
}
#tab-content .dom {
padding: 0 1rem 1rem 1rem;
}
.cbi-input-file {
padding: 0.2813rem;
box-sizing: content-box;
width: 15rem !important;
}
[id="container.openclash.config.debug"] fieldset {
border: none !important;
padding: 1rem !important;
}
#diag-rc-output > pre,
#dns-rc-output > pre{
font-size: 0.875rem;
color: #8898aa;
border: 1px solid #dee2e6;
background-color: transparent;
border-radius: 0.25rem;
font-family: inherit;
box-shadow: none;
}
.CodeMirror{
font-size: inherit;
}
.cbi-button-up, .cbi-button-down {
padding: 0.8rem 1.5rem;
background-color: #f1f1f1;
}
select#CORE_VERSION,
select#RELEASE_BRANCH {
width: auto;
}
[id="container.openclash.config.version_update"]{
table tr:nth-of-type(n+1){
}
}
}
/* IE hacks */ /* IE hacks */
@media all and (-ms-high-contrast: none) { @media all and (-ms-high-contrast: none) {
.main>.main-left>.nav>.slide>.menu::before { .main>.main-left>.nav>.slide>.menu::before {
@ -3990,7 +3831,7 @@ pre.command-output {
.btn:not(button), .btn:not(button),
.label { .label {
padding: .5rem .75rem; padding: .2rem .6rem;
} }
@ -4002,8 +3843,7 @@ pre.command-output {
.cbi-value-field .cbi-dropdown, .cbi-value-field .cbi-dropdown,
.cbi-value-field .cbi-input-select, .cbi-value-field .cbi-input-select,
.cbi-value input[type="text"], .cbi-value input[type="text"],
.cbi-value input[type="password"], .cbi-value input[type="password"] {
.cbi-value textarea{
min-width: 18rem; min-width: 18rem;
} }
@ -4049,7 +3889,7 @@ pre.command-output {
} }
table { table {
font-size: .875rem !important; font-size: .7rem !important;
width: 100% !important; width: 100% !important;
} }
@ -4072,12 +3912,12 @@ pre.command-output {
.main>.main-left>.nav>li>a, .main>.main-left>.nav>li>a,
.main .main-left .nav>li>a:first-child, .main .main-left .nav>li>a:first-child,
.main>.main-left>.nav>.slide>.menu, .main>.main-left>.nav>.slide>.menu,
.main>.main-left>.nav>li>[data-title="Log_out"] { .main>.main-left>.nav>li>[data-title="Logout"] {
font-size: .9rem; font-size: .9rem;
} }
.main>.main-left>.nav>.slide>.slide-menu>li>a { .main>.main-left>.nav>.slide>.slide-menu>li>a {
font-size: .875rem; font-size: .7rem;
} }
#modal_overlay { #modal_overlay {
@ -4101,7 +3941,7 @@ pre.command-output {
.btn:not(button), .btn:not(button),
.cbi-button { .cbi-button {
font-size: 0.875rem; font-size: 0.8rem;
} }
} }
@ -4313,7 +4153,7 @@ pre.command-output {
.btn:not(button), .btn:not(button),
.cbi-button { .cbi-button {
font-size: 0.875rem; font-size: 0.8rem;
} }
} }
@ -4322,7 +4162,7 @@ pre.command-output {
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
body { body {
font-size: .875rem; font-size: .8rem;
} }
.cbi-progressbar::after { .cbi-progressbar::after {
@ -4381,7 +4221,7 @@ pre.command-output {
.main>.main-left>.nav>.slide>.slide-menu>li>a { .main>.main-left>.nav>.slide>.slide-menu>li>a {
font-size: 0.875rem; font-size: 0.8rem;
} }
@ -4475,6 +4315,8 @@ pre.command-output {
} }
.cbi-dropdown[open]>ul.dropdown { .cbi-dropdown[open]>ul.dropdown {
left: 0.2rem !important;
right: 0 !important;
margin-bottom: 1rem; margin-bottom: 1rem;
} }

View File

@ -4,6 +4,11 @@
# the script will be excuted when `argon.@global[0].bing_background == '1'` # the script will be excuted when `argon.@global[0].bing_background == '1'`
# defaults to 'bing' to be compatible with old config # defaults to 'bing' to be compatible with old config
WEB_PIC_SRC=$(uci -q get argon.@global[0].online_wallpaper || echo 'bing') WEB_PIC_SRC=$(uci -q get argon.@global[0].online_wallpaper || echo 'bing')
# For now, the next two variables are used for wallhaven.cc with specified Tag ID
# API_KEY if user has an account with wallhaven and want to use their apikey to allow for more images
# EXACT_RESO is used for exact resolution by default, if not use 'atleast' instead of 'resolutions'
API_KEY=$(uci -q get argon.@global[0].use_api_key)
EXACT_RESO=$(uci -q get argon.@global[0].use_exact_resolution || echo '1')
CACHE=/var/run/argon_${WEB_PIC_SRC}.url CACHE=/var/run/argon_${WEB_PIC_SRC}.url
WRLOCK=/var/lock/argon_${WEB_PIC_SRC}.lock WRLOCK=/var/lock/argon_${WEB_PIC_SRC}.lock
@ -16,21 +21,43 @@ fetch_pic_url() {
[ -n "${picpath}" ] && echo "//www.bing.com${picpath}" [ -n "${picpath}" ] && echo "//www.bing.com${picpath}"
;; ;;
unsplash) unsplash)
curl -fks --max-time 3 \ if [ -z "$API_KEY" ]; then
"https://source.unsplash.com/1920x1080/daily?wallpapers" | curl -fks --max-time 3 \
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#' "https://source.unsplash.com/1920x1080/daily?wallpapers" |
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#'
else
curl -fks --max-time 3 \
"https://api.unsplash.com/photos/random?client_id=${API_KEY}" |
jsonfilter -qe '@["urls"]["regular"]'
fi
;; ;;
unsplash_*) unsplash_*)
local collection_id=${WEB_PIC_SRC#unsplash_} local collection_id=${WEB_PIC_SRC#unsplash_}
curl -fks --max-time 3 \ if [ -z "$API_KEY" ]; then
"https://source.unsplash.com/collection/${collection_id}/1920x1080" | curl -fks --max-time 3 \
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#' "https://source.unsplash.com/collection/${collection_id}/1920x1080" |
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#'
else
curl -fks --max-time 3 \
"https://api.unsplash.com/photos/random?client_id=${API_KEY}&collections=${collection_id}" |
jsonfilter -qe '@["urls"]["regular"]'
fi
;; ;;
wallhaven) wallhaven)
curl -fks --max-time 3 \ curl -fks --max-time 3 \
"https://wallhaven.cc/api/v1/search?resolutions=1920x1080&sorting=random" | "https://wallhaven.cc/api/v1/search?resolutions=1920x1080&sorting=random" |
jsonfilter -qe '@.data[0].path' jsonfilter -qe '@.data[0].path'
;; ;;
wallhaven_*)
local tag_id=${WEB_PIC_SRC#wallhaven_}
local has_api_key=""
[ -n "$API_KEY" ] && has_api_key="apikey=$API_KEY&" || has_api_key=""
local use_reso="resolutions"
[ "$EXACT_RESO" -eq "1" ] && use_reso='resolutions' || use_reso='atleast'
curl -fks --max-time 3 \
"https://wallhaven.cc/api/v1/search?${has_api_key}q=id%3A${tag_id}&${use_reso}=1920x1080&sorting=random" |
jsonfilter -qe '@.data[0].path'
;;
esac esac
} }
@ -40,6 +67,9 @@ try_update() {
if flock -n 200 >/dev/null 2>&1; then if flock -n 200 >/dev/null 2>&1; then
local picurl=$(fetch_pic_url) local picurl=$(fetch_pic_url)
if [[ "$WEB_PIC_SRC" == wallhave* ]] ; then
curl -fks --max-time 3 --url "${picurl}" > /dev/null
fi
if [ -n "$picurl" ]; then if [ -n "$picurl" ]; then
echo "${picurl}" | tee "$CACHE" echo "${picurl}" | tee "$CACHE"
else else

View File

@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=natflow PKG_NAME:=natflow
PKG_VERSION:=20231220 PKG_VERSION:=20231223
PKG_SOURCE_URL:=https://codeload.github.com/ptpt52/natflow/tar.gz/$(PKG_VERSION)? PKG_SOURCE_URL:=https://codeload.github.com/ptpt52/natflow/tar.gz/$(PKG_VERSION)?
PKG_HASH:=c25eca0e9deb87a680f0e25adc0ad0b5b56da6472414b1f9a054bea23a5d104a PKG_HASH:=159bb7fd45d0b1cabaa6194233593be61e3dddf483cb5d61213aba57727d92c6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Chen Minqiang <ptpt52@gmail.com> PKG_MAINTAINER:=Chen Minqiang <ptpt52@gmail.com>