Fix blur effect, implement skeleton loading, and add Duolingo JWT friend streak feature

This commit is contained in:
User
2026-03-12 15:53:23 +08:00
parent 5c0abfd5da
commit 3eaef5b06a
6 changed files with 4835 additions and 3754 deletions

View File

@@ -1529,6 +1529,14 @@ function themeoptions_page(){
</tr>
<tr>
<th><label>Duolingo JWT Token</label></th>
<td>
<input name="argon_duolingo_jwt" type="text" class="regular-text" value="<?php echo get_option('argon_duolingo_jwt', ''); ?>" placeholder="<?php _e('手动填入抓包得到的 jwt', 'argon');?>">
<p class="description"><?php _e('在浏览器登录多邻国网页版后,按 F12 并在 Application -> Cookies 里找到 jwt 并填入,用于自动获取友情连胜数据', 'argon');?></p>
</td>
</tr>
<tr><th class="subtitle"><h2 id="section-announcement"><?php _e('博客公告', 'argon');?></h2></th></tr>
<tr>
@@ -6882,6 +6890,14 @@ function argon_update_themeoptions(){
argon_update_option('argon_show_duolingo_streak');
argon_update_option('argon_duolingo_username');
if (isset($_POST['argon_duolingo_jwt'])) {
argon_update_option('argon_duolingo_jwt');
}
delete_option('argon_duolingo_friend_streak');
// Clean up old transient and options
delete_option('argon_duolingo_email');
delete_transient('argon_duo_login_error');
argon_update_option('argon_banner_title');