diff --git a/css/home.css b/css/home.css index 01ade5f..f8abb51 100644 --- a/css/home.css +++ b/css/home.css @@ -576,6 +576,7 @@ main h1 { } .userheader .icon { + position: relative; margin-left: 24px; margin-right: 24px; display: flex; @@ -603,8 +604,8 @@ main h1 { } .userheader .icon .status { - position: relative; - left: calc(-24px + -8px); + position: absolute; + left: calc(148px - 32px); top: calc(32px - 4px); width: 24px; height: 24px; diff --git a/js/view_function.js b/js/view_function.js index fed23da..c7a637f 100644 --- a/js/view_function.js +++ b/js/view_function.js @@ -16,7 +16,8 @@ async function replaceMentions(text) { let index = 0; // aタグの一時置き換え - text = text.replace(/]*>.*?<\/a>/gi, (match) => { + const ignoreRegex = /]*>.*?<\/a>|.*?<\/span>|
.*?<\/code><\/pre>/gis;
+    text = text.replace(ignoreRegex, (match) => {
         const placeholder = `\u2063{{PLACEHOLDER${index}}}\u2063`;
         placeholders.push(match);
         index++;
@@ -134,71 +135,81 @@ function saveEmojiCache() {
 }
 
 async function replaceCustomEmojis(text) {
+    const placeholders = [];
+    let index = 0;
+
+    const ignoreRegex = /]*>.*?<\/a>|.*?<\/span>|
.*?<\/code><\/pre>/gis;
+    text = text.replace(ignoreRegex, (match) => {
+        const placeholder = `\u2063{{PLACEHOLDER_EMOJI_${index}}}\u2063`;
+        placeholders.push(match);
+        index++;
+        return placeholder;
+    });
+
     const emojiMatches = [...text.matchAll(/:([a-zA-Z0-9_]+):/g)];
-    if (emojiMatches.length === 0) return text;
 
-    const uniqueEmojis = [...new Set(emojiMatches.map(match => match[1]))];
-    const emojisToFetch = uniqueEmojis.filter(name => !emojiCache[name] && !fetchingEmojis[name]);
+    if (emojiMatches.length > 0) {
+        const uniqueEmojis = [...new Set(emojiMatches.map(match => match[1]))];
+        const emojisToFetch = uniqueEmojis.filter(name => !emojiCache[name] && !fetchingEmojis[name]);
 
-    if (emojisToFetch.length > 0) {
-        const fetchPromise = new Promise((resolve) => {
-            $.ajax({
-                url: '../function/get_customemoji.php',
-                method: 'POST',
-                data: {
-                    emoji: emojisToFetch.join(','),
-                    userid: global_userid,
-                    account_id: global_account_id
-                },
-                dataType: 'json',
-                timeout: 30000,
-                success: function (response) {
-                    if (response.success && response.emojis) {
-                        for (const name of emojisToFetch) {
-                            if (response.success && response.emojis) {
-                                for (const name of emojisToFetch) {
-                                    if (response.emojis[name]) {
-                                        const emoji = response.emojis[name];
-                                        emojiCache[name] = emoji.emojipath;
-                                    } else {
-                                        emojiCache[name] = null;
-                                    }
+        if (emojisToFetch.length > 0) {
+            const fetchPromise = new Promise((resolve) => {
+                $.ajax({
+                    url: '../function/get_customemoji.php',
+                    method: 'POST',
+                    data: {
+                        emoji: emojisToFetch.join(','),
+                        userid: global_userid,
+                        account_id: global_account_id
+                    },
+                    dataType: 'json',
+                    timeout: 30000,
+                    success: function (response) {
+                        if (response.success && response.emojis) {
+                            for (const name of emojisToFetch) {
+                                if (response.emojis[name]) {
+                                    const emoji = response.emojis[name];
+                                    emojiCache[name] = emoji.emojipath;
+                                } else {
+                                    emojiCache[name] = null;
                                 }
                             }
+                        } else {
+                            for (const name of emojisToFetch) {
+                                emojiCache[name] = null;
+                            }
                         }
-                    } else {
+                        saveEmojiCache();
+                        resolve();
+                    },
+                    error: function () {
                         for (const name of emojisToFetch) {
                             emojiCache[name] = null;
                         }
+                        saveEmojiCache();
+                        resolve();
                     }
-                    saveEmojiCache();
-                    resolve();
-                },
-                error: function () {
-                    for (const name of emojisToFetch) {
-                        emojiCache[name] = null;
-                    }
-                    saveEmojiCache();
-                    resolve();
-                }
+                });
             });
-        });
 
-        emojisToFetch.forEach(name => {
-            fetchingEmojis[name] = fetchPromise;
-        });
+            emojisToFetch.forEach(name => {
+                fetchingEmojis[name] = fetchPromise;
+            });
 
-        await fetchPromise;
+            await fetchPromise;
+        }
+
+        await Promise.all(uniqueEmojis.map(name => fetchingEmojis[name]));
+
+        text = text.replace(/:([a-zA-Z0-9_]+):/g, (_, name) => {
+            const url = emojiCache[name];
+            if (url === undefined || url === null) return `:${name}:`;
+            return `:${name}:`;
+        });
     }
 
-    await Promise.all(uniqueEmojis.map(name => fetchingEmojis[name]));
-
-    text = text.replace(/:([a-zA-Z0-9_]+):/g, (_, name) => {
-        const url = emojiCache[name];
-        if (url === undefined) return `:${name}:`; // 未取得
-        if (url === null) return `:${name}:`;       // 存在しない
-
-        return `:${name}:`; // ここで生成
+    placeholders.forEach((original, i) => {
+        text = text.replace(`\u2063{{PLACEHOLDER_EMOJI_${i}}}\u2063`, original);
     });
 
     return text;
diff --git a/server/uwuzuinfo.txt b/server/uwuzuinfo.txt
index 418ed57..83a253b 100644
--- a/server/uwuzuinfo.txt
+++ b/server/uwuzuinfo.txt
@@ -1,4 +1,4 @@
 uwuzu
-1.6.8
+1.6.9
 2025/12/30
 daichimarukana,putonfps
\ No newline at end of file
diff --git a/server/uwuzurelease.txt b/server/uwuzurelease.txt
index 9fe52b5..9db0420 100644
--- a/server/uwuzurelease.txt
+++ b/server/uwuzurelease.txt
@@ -1,8 +1,13 @@
 ## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
 ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
 
+## Version 1.6.9 (Hapuego)
+2025/12/30
+fix: ユーザープロフィールページでのオンラインステータスのUIが崩れないように修正しました!
+fix: ユーズでインラインコード・コードブロックを使用している際に、インラインコード・コードブロック内にメンションまたはカスタム絵文字が含まれていた際に、それらが変換されてしまう問題を修正しました!
+
 ## Version 1.6.8 (Hapuego)
-2025/12/26
+2025/12/30
 fix: 不要なコードを削除しました!
 fix: 一部UIの崩れを修正しました!
 fix: アポストロフィーが正しく表示されない問題を修正しました!
@@ -31,6 +36,7 @@ new: 管理者向けAPIを追加しました!
     - 通報を解決する
 new: AIによる学習を拒否する機能を強化しました!
     これにより、AIによる学習を拒否する設定がオンの場合に、uwuzu上で画像を表示すると画像の下に「No AI 機械学習への利用を一切拒否します。」と表示されるようになります。
+uwuzu_database.sqlは更新済みです。
 
 ## Version 1.6.7 (Hapuego)
 2025/12/26
diff --git a/update.json b/update.json
index 0c63194..6c6429e 100644
--- a/update.json
+++ b/update.json
@@ -1,31 +1,13 @@
 {
     "software": "uwuzu",
-    "version": "1.6.8",
+    "version": "1.6.9",
     "release_date": "2025/12/30",
-    "release_notes": "このアップデートには、アポストロフィーが正しく表示されない問題の修正や、一部ページでブックマーク追加時に画面上からお知らせが出ない問題の修正など、いくつかのバグ修正が含まれます!\nまた、新機能でオンラインステータス機能と管理者向けAPIが含まれます!\n詳細はリリースノートをご確認ください。",
-    "notices": "アップデートの前にデータベース構造の更新が必要です。リリースノートの案内に沿って更新をしてからアップデートをしてください。\nアップデート前にデータのバックアップを行うことをおすすめします!",
+    "release_notes": "このアップデートには、ユーザープロフィールページにてオンラインステータスが潰れてしまう問題と、ユーズのインラインコードに関するバグの修正が含まれます!\n詳細はリリースノートをご確認ください。",
+    "notices": "アップデート前にデータのバックアップを行うことをおすすめします!",
     "files": {
         "overwrite": [
-            "/uwuzu_error_code.txt",
-            "/api/auth.php",
-            "/api/admin/reports/index.php",
-            "/api/admin/reports/resolve.php",
-            "/api/admin/users/index.php",
-            "/api/admin/users/sanction.php",
-            "/api/users/index.php",
-            "/bookmark/index.php",
             "/css/home.css",
-            "/function/function.php",
-            "/home/index.php",
-            "/js/nsfw_event.js",
             "/js/view_function.js",
-            "/others/index.php",
-            "/search/index.php",
-            "/settings/index.php",
-            "/settings_admin/overview_admin.php",
-            "/settings_admin/userinfo.php",
-            "/ueuse/index.php",
-            "/user/index.php",
             "/server/uwuzuabout.txt",
             "/server/uwuzuinfo.txt",
             "/server/uwuzurelease.txt"