From a7ea74923a8d86c80db7cac824f3b38d79119978 Mon Sep 17 00:00:00 2001 From: EYHN Date: Thu, 27 Jun 2024 03:44:14 +0000 Subject: [PATCH] fix(templates): use url safe base64 in templates (#7354) --- .../frontend/templates/build-stickers.mjs | 2 +- .../templates/stickers-templates.gen.ts | 62 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/frontend/templates/build-stickers.mjs b/packages/frontend/templates/build-stickers.mjs index 7fc3b2bbbf..49f4bd07a7 100644 --- a/packages/frontend/templates/build-stickers.mjs +++ b/packages/frontend/templates/build-stickers.mjs @@ -36,7 +36,7 @@ import stickerContent${id} from './stickers/${category}/Content/${sticker}';`, name: ${JSON.stringify(name)}, cover: stickerCover${id}, content: stickerContent${id}, - hash: ${JSON.stringify(hash)}, + hash: ${JSON.stringify(hash).replace(/\+/g, '-').replace(/\//g, '_')}, }`, }; } diff --git a/packages/frontend/templates/stickers-templates.gen.ts b/packages/frontend/templates/stickers-templates.gen.ts index c04abbcbf8..d8925dbef3 100644 --- a/packages/frontend/templates/stickers-templates.gen.ts +++ b/packages/frontend/templates/stickers-templates.gen.ts @@ -178,13 +178,13 @@ const templates = { name: "Crybaby", cover: stickerCover000, content: stickerContent000, - hash: "bRWBcaZveq6swjn8MwKVISsVnAr2tf4ZHTSTU+eRA5Q=", + hash: "bRWBcaZveq6swjn8MwKVISsVnAr2tf4ZHTSTU-eRA5Q=", }), buildStickerTemplate({ name: "Drool", cover: stickerCover001, content: stickerContent001, - hash: "BUwkYl7SHNQCypB/SvkggKwAD3XxCRUPV6dorpW/ki0=", + hash: "BUwkYl7SHNQCypB_SvkggKwAD3XxCRUPV6dorpW_ki0=", }), buildStickerTemplate({ name: "Fuming", @@ -196,31 +196,31 @@ const templates = { name: "Hi~", cover: stickerCover003, content: stickerContent003, - hash: "h6r0wW+eIhWUF1AkN/EnHv+q8VfpZ4NOQKKTsbU8RPc=", + hash: "h6r0wW-eIhWUF1AkN_EnHv-q8VfpZ4NOQKKTsbU8RPc=", }), buildStickerTemplate({ name: "Holding Tears", cover: stickerCover004, content: stickerContent004, - hash: "NnXjSqFfmw/D3Ne13JOx0yXIWtA9Exm6hggPGDgDfgc=", + hash: "NnXjSqFfmw_D3Ne13JOx0yXIWtA9Exm6hggPGDgDfgc=", }), buildStickerTemplate({ name: "Love Blows", cover: stickerCover005, content: stickerContent005, - hash: "Oggqz68tzBBYevbwcwXqZjb4im48+f3hh94wf8RS+Ok=", + hash: "Oggqz68tzBBYevbwcwXqZjb4im48-f3hh94wf8RS-Ok=", }), buildStickerTemplate({ name: "Me_ Really_", cover: stickerCover006, content: stickerContent006, - hash: "W8dfy2MD+Fu2VOIPcYfHOuPNBnEIWcFg8TJJeta9iOc=", + hash: "W8dfy2MD-Fu2VOIPcYfHOuPNBnEIWcFg8TJJeta9iOc=", }), buildStickerTemplate({ name: "OK", cover: stickerCover007, content: stickerContent007, - hash: "aTpuWm7bxzUevhFn/xyIz0HO5YD+I4GmdoPvmw590PY=", + hash: "aTpuWm7bxzUevhFn_xyIz0HO5YD-I4GmdoPvmw590PY=", }), buildStickerTemplate({ name: "Sassy Flick", @@ -232,25 +232,25 @@ const templates = { name: "Shockwave", cover: stickerCover009, content: stickerContent009, - hash: "NfiIZ+FHd2XWYF8L7pp8X1M3nGTM3+005VUtCOchld8=", + hash: "NfiIZ-FHd2XWYF8L7pp8X1M3nGTM3-005VUtCOchld8=", }), buildStickerTemplate({ name: "Snooze Drool", cover: stickerCover010, content: stickerContent010, - hash: "HiRDmqZNvnKQDBX05caQF4Fg9PHh4/ZS0n/alWZcQ/M=", + hash: "HiRDmqZNvnKQDBX05caQF4Fg9PHh4_ZS0n_alWZcQ_M=", }), buildStickerTemplate({ name: "Swag", cover: stickerCover011, content: stickerContent011, - hash: "4bEGq5+p+s6HfbtbVNwGEvEg+YEQ8wA8NA7Uj/vxTBE=", + hash: "4bEGq5-p-s6HfbtbVNwGEvEg-YEQ8wA8NA7Uj_vxTBE=", }), buildStickerTemplate({ name: "Sweatdrop", cover: stickerCover012, content: stickerContent012, - hash: "6axmrPIHx4ahOGB/TtjLOPh4J6HYggLxxx0VGxnMu2E=", + hash: "6axmrPIHx4ahOGB_TtjLOPh4J6HYggLxxx0VGxnMu2E=", }), buildStickerTemplate({ name: "Thumbs Up", @@ -262,19 +262,19 @@ const templates = { name: "What_", cover: stickerCover014, content: stickerContent014, - hash: "JqWfcP9Q0kGE4wDuVZCi4lW2U7O15trpL++fdNrRJvQ=", + hash: "JqWfcP9Q0kGE4wDuVZCi4lW2U7O15trpL--fdNrRJvQ=", }),], "Contorted Stickers": [ buildStickerTemplate({ name: "AFFiNE", cover: stickerCover015, content: stickerContent015, - hash: "i3piAMnoD4STQnEjTrAe/ZRdwHcD34n+sJZY8IN1blg=", + hash: "i3piAMnoD4STQnEjTrAe_ZRdwHcD34n-sJZY8IN1blg=", }), buildStickerTemplate({ name: "AI", cover: stickerCover016, content: stickerContent016, - hash: "VZJPB8ZBVtiZ+m04KNtlguY/t9VLx4itHILIQ3l1MRw=", + hash: "VZJPB8ZBVtiZ-m04KNtlguY_t9VLx4itHILIQ3l1MRw=", }), buildStickerTemplate({ name: "Cat", @@ -298,31 +298,31 @@ const templates = { name: "Fire", cover: stickerCover020, content: stickerContent020, - hash: "cQnt7T9qxI5+It+reeo3E4XVA3HA89L2myi1k2EJfn8=", + hash: "cQnt7T9qxI5-It-reeo3E4XVA3HA89L2myi1k2EJfn8=", }), buildStickerTemplate({ name: "Info", cover: stickerCover021, content: stickerContent021, - hash: "kwKlgzVYNRk4AyOJs3Xtyt0vMWovo+7BfEqaWndDInM=", + hash: "kwKlgzVYNRk4AyOJs3Xtyt0vMWovo-7BfEqaWndDInM=", }), buildStickerTemplate({ name: "King", cover: stickerCover022, content: stickerContent022, - hash: "W+RCNTaadPNEI9OALAGHqv1cGmYD1y7KxIRGLsbr+DM=", + hash: "W-RCNTaadPNEI9OALAGHqv1cGmYD1y7KxIRGLsbr-DM=", }), buildStickerTemplate({ name: "Love Face", cover: stickerCover023, content: stickerContent023, - hash: "51B1S9eZ1rgxT+zG5npI/5l1sGss6dTVYiyut5fNPrs=", + hash: "51B1S9eZ1rgxT-zG5npI_5l1sGss6dTVYiyut5fNPrs=", }), buildStickerTemplate({ name: "Love", cover: stickerCover024, content: stickerContent024, - hash: "fK5Bk7hxwSEHuNQ2WfO+ysII/T20z37P1JvLf00ocUQ=", + hash: "fK5Bk7hxwSEHuNQ2WfO-ysII_T20z37P1JvLf00ocUQ=", }), buildStickerTemplate({ name: "Notice", @@ -340,7 +340,7 @@ const templates = { name: "Question", cover: stickerCover027, content: stickerContent027, - hash: "bvNeY3Q+At8NxFzcjTYx/mn3YnJkbUhh6XEBp3xB0Uk=", + hash: "bvNeY3Q-At8NxFzcjTYx_mn3YnJkbUhh6XEBp3xB0Uk=", }), buildStickerTemplate({ name: "Smile Face", @@ -364,13 +364,13 @@ const templates = { name: "A lot of question", cover: stickerCover031, content: stickerContent031, - hash: "yKPa7vqOxC6rh+e0SVdlp0RwMWQ9mzDKTtE5g2UnHGk=", + hash: "yKPa7vqOxC6rh-e0SVdlp0RwMWQ9mzDKTtE5g2UnHGk=", }), buildStickerTemplate({ name: "AFFiNE AI", cover: stickerCover032, content: stickerContent032, - hash: "FwBs2WApEGkiFmu1XR4fHZ/7fOlSsSBdYEyGs2lDeLk=", + hash: "FwBs2WApEGkiFmu1XR4fHZ_7fOlSsSBdYEyGs2lDeLk=", }), buildStickerTemplate({ name: "Arrow", @@ -388,37 +388,37 @@ const templates = { name: "Blue Screen", cover: stickerCover035, content: stickerContent035, - hash: "30OHymd5x+3zr/5KxQm3DzVfxyWWAf0QnmfHpIOoLzQ=", + hash: "30OHymd5x-3zr_5KxQm3DzVfxyWWAf0QnmfHpIOoLzQ=", }), buildStickerTemplate({ name: "Boom", cover: stickerCover036, content: stickerContent036, - hash: "mpTlbN8fJWJUMlHcCCrQuzKTK844+F9YuebgR0kgJa8=", + hash: "mpTlbN8fJWJUMlHcCCrQuzKTK844-F9YuebgR0kgJa8=", }), buildStickerTemplate({ name: "Cool", cover: stickerCover037, content: stickerContent037, - hash: "3OujPx/YOY1MTqmgrbWaNDJlJeoLNvTWw96gW22rxps=", + hash: "3OujPx_YOY1MTqmgrbWaNDJlJeoLNvTWw96gW22rxps=", }), buildStickerTemplate({ name: "Dino", cover: stickerCover038, content: stickerContent038, - hash: "j13ZqHGUnVdGW3/1uWw/sFYeHj1SFoNsi5JwrTvpC+k=", + hash: "j13ZqHGUnVdGW3_1uWw_sFYeHj1SFoNsi5JwrTvpC-k=", }), buildStickerTemplate({ name: "Histogram", cover: stickerCover039, content: stickerContent039, - hash: "A1oGPUmv+Ypb+W7/jPgpSsVGA71J8njyr9f+97UnJQg=", + hash: "A1oGPUmv-Ypb-W7_jPgpSsVGA71J8njyr9f-97UnJQg=", }), buildStickerTemplate({ name: "Local First", cover: stickerCover040, content: stickerContent040, - hash: "LFIRZK4TswzJvThRO2Vch/aqfY2UZ6kjAyAEsQS+hHM=", + hash: "LFIRZK4TswzJvThRO2Vch_aqfY2UZ6kjAyAEsQS-hHM=", }), buildStickerTemplate({ name: "Medal", @@ -430,19 +430,19 @@ const templates = { name: "Notice", cover: stickerCover042, content: stickerContent042, - hash: "oafBAmM8MB094GI9I4U2iG6TWoZpCoa4nDmGY2eH/Kw=", + hash: "oafBAmM8MB094GI9I4U2iG6TWoZpCoa4nDmGY2eH_Kw=", }), buildStickerTemplate({ name: "Pin", cover: stickerCover043, content: stickerContent043, - hash: "kEy0pTA3dsClFtIwaJJV9NZQvn2xib+biyFJvRp9tzM=", + hash: "kEy0pTA3dsClFtIwaJJV9NZQvn2xib-biyFJvRp9tzM=", }), buildStickerTemplate({ name: "Star", cover: stickerCover044, content: stickerContent044, - hash: "Au+JbxT7XZvvDueaVg37tJ4kyH9vLxiC7tLgcbrZV48=", + hash: "Au-JbxT7XZvvDueaVg37tJ4kyH9vLxiC7tLgcbrZV48=", }),], }