Merge branch 'develop' into webhooks

This commit is contained in:
lain 2026-05-06 07:53:46 +00:00
commit 133fc64472
432 changed files with 13238 additions and 3502 deletions

View file

@ -23,10 +23,12 @@ defmodule Pleroma.Repo.Migrations.MoveActivityExpirationsToOban do
|> Pleroma.Repo.stream()
|> Stream.each(fn expiration ->
with {:ok, expires_at} <- DateTime.from_naive(expiration.scheduled_at, "Etc/UTC") do
Pleroma.Workers.PurgeExpiredActivity.enqueue(%{
activity_id: FlakeId.to_string(expiration.activity_id),
expires_at: expires_at
})
Pleroma.Workers.PurgeExpiredActivity.enqueue(
%{
activity_id: FlakeId.to_string(expiration.activity_id)
},
scheduled_at: expires_at
)
end
end)
|> Stream.run()

View file

@ -21,7 +21,7 @@ defmodule Pleroma.Repo.Migrations.MoveTokensExpirationIntoOban do
from(t in Pleroma.Web.OAuth.Token, where: t.valid_until > ^NaiveDateTime.utc_now())
|> Pleroma.Repo.stream()
|> Stream.each(fn token ->
Pleroma.Workers.PurgeExpiredToken.enqueue(%{
enqueue(%{
token_id: token.id,
valid_until: DateTime.from_naive!(token.valid_until, "Etc/UTC"),
mod: Pleroma.Web.OAuth.Token
@ -33,7 +33,7 @@ defmodule Pleroma.Repo.Migrations.MoveTokensExpirationIntoOban do
from(t in Pleroma.MFA.Token, where: t.valid_until > ^NaiveDateTime.utc_now())
|> Pleroma.Repo.stream()
|> Stream.each(fn token ->
Pleroma.Workers.PurgeExpiredToken.enqueue(%{
enqueue(%{
token_id: token.id,
valid_until: DateTime.from_naive!(token.valid_until, "Etc/UTC"),
mod: Pleroma.MFA.Token
@ -41,4 +41,14 @@ defmodule Pleroma.Repo.Migrations.MoveTokensExpirationIntoOban do
end)
|> Stream.run()
end
@spec enqueue(%{token_id: integer(), valid_until: DateTime.t()}) ::
{:ok, Oban.Job.t()} | {:error, Ecto.Changeset.t()}
defp enqueue(args) do
{scheduled_at, args} = Map.pop(args, :valid_until)
args
|> Pleroma.Workers.PurgeExpiredToken.new(scheduled_at: scheduled_at)
|> Oban.insert()
end
end

View file

@ -0,0 +1,11 @@
defmodule Pleroma.Repo.Migrations.AddPinnedToChats do
use Ecto.Migration
def change do
alter table(:chats) do
add(:pinned, :boolean, default: false, null: false)
end
create(index(:chats, [:pinned]))
end
end

View file

@ -0,0 +1,11 @@
defmodule Pleroma.Repo.Migrations.AddActivityAssignedAccountIndex do
use Ecto.Migration
def change do
create_if_not_exists(
index(:activities, ["(data->>'assigned_account')"],
name: :activities_assigned_account_index
)
)
end
end

View file

@ -0,0 +1,7 @@
defmodule Pleroma.Repo.Migrations.AddAcceptsChatMessagesIndexToUsers do
use Ecto.Migration
def change do
create(index(:users, [:accepts_chat_messages]))
end
end

View file

@ -0,0 +1,9 @@
defmodule Pleroma.Repo.Migrations.AddExclusiveToLists do
use Ecto.Migration
def change do
alter table(:lists) do
add(:exclusive, :boolean, default: false)
end
end
end

View file

@ -0,0 +1,9 @@
defmodule Pleroma.Repo.Migrations.CleanupStaleDigestEmailJobs do
use Ecto.Migration
def up do
execute(
"DELETE from oban_jobs WHERE queue = 'mailer' AND worker = 'Pleroma.Workers.Cron.DigestEmailsWorker'"
)
end
end

View file

@ -80,9 +80,13 @@ defmodule Pleroma.HTML.Scrubber.Default do
Meta.allow_tag_with_this_attribute_values(:span, "class", [
"h-card",
"recipients-inline",
"quote-inline"
"quote-inline",
"invisible",
"ellipsis"
])
Meta.allow_tag_with_this_attribute_values(:p, "class", ["quote-inline"])
Meta.allow_tag_with_these_attributes(:span, ["lang"])
Meta.allow_tag_with_this_attribute_values(:code, "class", ["inline"])

View file

@ -13,8 +13,8 @@
<link rel="stylesheet" id="splashscreen" href="/static/splash.css" />
<link rel="stylesheet" id="custom-styles-holder" type="text/css" href="/static/empty.css" />
<!--server-generated-meta-->
<script type="module" crossorigin src="/static/js/main.AC3URMfQ.js"></script>
<link rel="stylesheet" crossorigin href="/static/css/main.D22XtkBO.css">
<script type="module" crossorigin src="/static/js/main.qxCxIqDs.js"></script>
<link rel="stylesheet" crossorigin href="/static/css/main.CF7uYwoC.css">
</head>
<body>
<noscript>To use Pleroma, please enable JavaScript.</noscript>

View file

@ -1,2 +1,8 @@
User-Agent: *
Disallow:
User-agent: *
Disallow: /
User-agent: FediIndex
Allow: /nodeinfo/2.0
Allow: /nodeinfo/2.1
Allow: /nodeinfo/2.2
Disallow: /

View file

@ -4,46 +4,55 @@
"https://w3id.org/security/v1",
"https://purl.archive.org/socialweb/webfinger",
{
"Emoji": "toot:Emoji",
"as": "https://www.w3.org/ns/activitystreams#",
"ostatus": "http://ostatus.org#",
"schema": "http://schema.org#",
"vcard": "http://www.w3.org/2006/vcard/ns#",
"fedibird": "http://fedibird.com/ns#",
"litepub": "http://litepub.social/ns#",
"sm": "http://smithereen.software/ns#",
"toot": "http://joinmastodon.org/ns#",
"alsoKnownAs": {
"@id": "as:alsoKnownAs",
"@type": "@id"
},
"Hashtag": "as:Hashtag",
"PropertyValue": "schema:PropertyValue",
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"quoteUrl": "as:quoteUrl",
"sensitive": "as:sensitive",
"atomUri": "ostatus:atomUri",
"conversation": {
"@id": "ostatus:conversation",
"@type": "@id"
},
"discoverable": "toot:discoverable",
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"capabilities": "litepub:capabilities",
"ostatus": "http://ostatus.org#",
"schema": "http://schema.org#",
"toot": "http://joinmastodon.org/ns#",
"fedibird": "http://fedibird.com/ns#",
"PropertyValue": "schema:PropertyValue",
"value": "schema:value",
"sensitive": "as:sensitive",
"litepub": "http://litepub.social/ns#",
"invisible": "litepub:invisible",
"quoteUri": "fedibird:quoteUri",
"capabilities": "litepub:capabilities",
"ChatMessage": "litepub:ChatMessage",
"directMessage": "litepub:directMessage",
"EmojiReact": "litepub:EmojiReact",
"formerRepresentations": "litepub:formerRepresentations",
"invisible": "litepub:invisible",
"listMessage": {
"@id": "litepub:listMessage",
"@type": "@id"
},
"quoteUrl": "as:quoteUrl",
"quoteUri": "fedibird:quoteUri",
"oauthRegistrationEndpoint": {
"@id": "litepub:oauthRegistrationEndpoint",
"@type": "@id"
},
"EmojiReact": "litepub:EmojiReact",
"ChatMessage": "litepub:ChatMessage",
"alsoKnownAs": {
"@id": "as:alsoKnownAs",
"@type": "@id"
},
"vcard": "http://www.w3.org/2006/vcard/ns#",
"formerRepresentations": "litepub:formerRepresentations",
"sm": "http://smithereen.software/ns#",
"nonAnonymous": "sm:nonAnonymous"
"nonAnonymous": "sm:nonAnonymous",
"discoverable": "toot:discoverable",
"Emoji": "toot:Emoji"
}
]
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
.async-component-error{display:-webkit-box;display:flex;height:100%;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.async-component-error .btn{margin:.5em;padding:.5em 2em}.settings-modal{overflow:hidden}.settings-modal h4{margin-bottom:.5em}.settings-modal .setting-list,.settings-modal .option-list{list-style-type:none;padding-left:2em}.settings-modal .setting-list .btn:not(.dropdown-button),.settings-modal .option-list .btn:not(.dropdown-button){padding:0 2em}.settings-modal .setting-list li,.settings-modal .option-list li{margin-bottom:.5em}.settings-modal .setting-list .suboptions,.settings-modal .option-list .suboptions{margin-top:.3em}.settings-modal .setting-list.two-column,.settings-modal .option-list.two-column{-webkit-column-count:2;column-count:2}.settings-modal .setting-list.two-column>li,.settings-modal .option-list.two-column>li{-webkit-column-break-inside:avoid;break-inside:avoid}.settings-modal .setting-description{margin-top:.2em;margin-bottom:2em;font-size:70%}.settings-modal .settings-modal-panel{overflow:hidden;-webkit-transition:-webkit-transform;transition:-webkit-transform;transition:transform;transition:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-duration:.3s;transition-duration:.3s;width:1000px;max-width:90vw;height:90vh}@media all and (width <= 800px){.settings-modal .settings-modal-panel{max-width:100vw;height:100%}}.settings-modal .settings-modal-panel>.panel-body{height:100%;overflow-y:hidden}.settings-modal .settings-modal-panel>.panel-body .btn{min-height:2em}.settings-modal .settings-footer{display:-webkit-box;display:flex;flex-wrap:wrap;line-height:2}.settings-modal .settings-footer>*{margin-right:.5em}.settings-modal .settings-footer .extra-content{display:-webkit-box;display:flex;-webkit-box-flex:1;flex-grow:1}.settings-modal.-mobile .setting-list,.settings-modal.-mobile .option-list{padding-left:.25em}.settings-modal.-mobile .setting-list>li,.settings-modal.-mobile .option-list>li{margin:1em 0;line-height:1.5em;vertical-align:middle}.settings-modal.-mobile .setting-list.two-column,.settings-modal.-mobile .option-list.two-column{-webkit-column-count:1;column-count:1}.settings-modal.peek .settings-modal-panel{-webkit-transform:translateY(calc((100vh - 100%)/2 + 100% - 50px));transform:translateY(calc((100vh - 100%)/2 + 100% - 50px))}@media all and (width <= 800px){.settings-modal.peek .settings-modal-panel{-webkit-transform:translateY(calc(100% - 50px));transform:translateY(calc(100% - 50px))}}

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
.AttachmentSetting .attachment{display:block;width:100%;height:15em;margin-bottom:.5em}.AttachmentSetting .attachment-input{margin-left:1em;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;width:20em}.AttachmentSetting.-compact .attachment-input{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:end;align-items:flex-end}.AttachmentSetting.-compact .attachment{-webkit-box-flex:0;flex:0;-webkit-box-ordinal-group:1;order:0;display:block;min-width:4em;height:4em;align-self:center;margin-bottom:0}.AttachmentSetting.-compact .control-field{-webkit-box-ordinal-group:2;order:1;min-width:12em;margin-left:.5em}.AttachmentSetting.-compact .control-upload{-webkit-box-ordinal-group:3;order:2;min-width:12em;padding:0 .5em}.AttachmentSetting .controls{margin-bottom:.5em}.AttachmentSetting .controls input,.AttachmentSetting .controls button{width:100%}.frontends-tab .cards-list{padding:0}.frontends-tab .relative{position:relative}.frontends-tab .overlay{position:absolute;background:var(--bg);z-index:2;opacity:.9;top:0;right:0;bottom:0;left:0}.frontends-tab dd{text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;max-width:10em}.emoji-tab-edit-popover{padding-left:.5em;padding-right:.5em;padding-bottom:.5em}.emoji-tab-edit-popover .emoji-tab-popover-new-upload{margin-bottom:2em}.emoji-tab-edit-popover .emoji{width:2.3em;height:2.3em}.emoji-tab-edit-popover .Select{display:inline-block}.emoji-tab-edit-popover h4{margin-bottom:1em;margin-top:1em}.emoji-tab .btn-group .btn:not(:first-child){margin-left:.5em}.emoji-tab .pack-info-wrapper{margin-top:1em}.emoji-tab .emoji-info-input{width:100%}.emoji-tab .emoji-data-input{width:40%;margin-left:.5em;margin-right:.5em}.emoji-tab .emoji{width:32px;height:32px}.emoji-tab .emoji-unsaved{box-shadow:0 3px 5px var(--cBlue)}.emoji-tab .emoji-list{display:-webkit-box;display:flex;flex-wrap:wrap;gap:1em}.emoji-tab-popover-button:not(:first-child){margin-left:.5em}.emoji-tab-popover-input{margin-bottom:.5em}.emoji-tab-popover-input label{display:block;margin-bottom:.5em}.emoji-tab-popover-input input{width:20em}.emoji-tab-popover-input .emoji-tab-popover-file{padding-top:3px}.emoji-tab-popover-input .warning{color:var(--cOrange)}.settings_tab-switcher{height:100%}.settings_tab-switcher .setting-item{border-bottom:2px solid var(--border);margin:1em 1em 1.4em;padding-bottom:1.4em}.settings_tab-switcher .setting-item>div,.settings_tab-switcher .setting-item>label{display:block;margin-bottom:.5em}.settings_tab-switcher .setting-item>div:last-child,.settings_tab-switcher .setting-item>label:last-child{margin-bottom:0}.settings_tab-switcher .setting-item .select-multiple{margin-top:.5em;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.settings_tab-switcher .setting-item .select-multiple .option-list{margin:.5em 0 0;padding-left:.5em}.settings_tab-switcher .setting-item:last-child{border-bottom:none;padding-bottom:0;margin-bottom:1em}.settings_tab-switcher .setting-item textarea{width:100%;max-width:100%;height:100px}.settings_tab-switcher .setting-item .unavailable,.settings_tab-switcher .setting-item .unavailable svg{color:var(--cRed)}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
.ModifiedIndicator{display:inline-block;position:relative}.modified-tooltip{margin:.5em 1em;min-width:10em;text-align:center}.DraftButtons{display:inline-block;position:relative}.DraftButtons .button-default{margin-left:.5em}.draft-tooltip{margin:.5em 1em;min-width:10em;text-align:center}

View file

@ -0,0 +1 @@
.vertical-tab-switcher{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;container-type:inline-size}.vertical-tab-switcher>.tabs{-webkit-box-flex:0;flex:0 0 15em;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;overflow:hidden auto;white-space:nowrap;text-overflow:ellipsis;width:15em;min-width:15em;border-right:1px solid;border-right-color:var(--border);box-sizing:border-box}.vertical-tab-switcher>.tabs>.menu-item{padding:.5em 1em}.vertical-tab-switcher>.tabs>.menu-item .tab-icon{vertical-align:middle;margin-right:.75em}.vertical-tab-switcher>.contents .tab-content-label{box-sizing:border-box;margin:0;border-bottom:1px solid var(--border);display:none}.vertical-tab-switcher>.contents .tab-content-label button{box-sizing:border-box;padding:.5em}.vertical-tab-switcher>.contents .tab-slot-wrapper{-webkit-box-flex:1;flex:1 1 auto;height:100%;overflow-y:auto;display:grid;grid-template-columns:minmax(1em,1fr) minmax(-webkit-min-content,45em) minmax(1em,1fr);grid-template-columns:minmax(1em,1fr) minmax(min-content,45em) minmax(1em,1fr);grid-template-areas:". content .";-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.vertical-tab-switcher>.contents .tab-slot-wrapper .tab-content{grid-area:content}.vertical-tab-switcher>.contents .tab-slot-wrapper .tab-content.-full-width{grid-column:1/4}.vertical-tab-switcher>.contents .tab-slot-wrapper .tab-content.-full-height>*{height:100%}.vertical-tab-switcher>.contents .tab-content-wrapper{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;height:100%;-webkit-box-flex:1;flex:1 1 auto}.vertical-tab-switcher>.contents .tab-content-wrapper.-hidden{display:none}.vertical-tab-switcher.-mobile>.contents .tab-content-label{display:block}.vertical-tab-switcher.-mobile.-nav-contents>.contents{display:block;-webkit-box-flex:1;flex-grow:1;flex-shrink:1}.vertical-tab-switcher.-mobile.-nav-contents>.tabs{display:none;-webkit-box-flex:0;flex-grow:0;flex-shrink:1}.vertical-tab-switcher.-mobile.-nav-tabs>.tabs{display:block;-webkit-box-flex:1;flex-grow:1}.vertical-tab-switcher.-mobile.-nav-tabs>.contents{display:none;-webkit-box-flex:0;flex-grow:0;flex-shrink:1}.vertical-tab-switcher.-mobile .tab-slot-wrapper{grid-template-columns:0 minmax(-webkit-min-content,45em) 0;grid-template-columns:0 minmax(min-content,45em) 0}@supports (container-type: inline-size){.vertical-tab-switcher.-nav-contents>.contents,.vertical-tab-switcher.-nav-tabs>.contents,.vertical-tab-switcher.-mobile.-nav-contents>.contents,.vertical-tab-switcher.-mobile.-nav-tabs>.contents{display:block;-webkit-box-flex:1;flex-grow:1}.vertical-tab-switcher.-nav-contents>.tabs,.vertical-tab-switcher.-nav-tabs>.tabs,.vertical-tab-switcher.-mobile.-nav-contents>.tabs,.vertical-tab-switcher.-mobile.-nav-tabs>.tabs{display:block;-webkit-box-flex:0;flex-grow:0}@container (width < 50em){.vertical-tab-switcher>.contents .tab-content-label{display:block}.vertical-tab-switcher.-mobile>.contents .tab-content-label{display:block}.vertical-tab-switcher.-nav-contents>.contents,.vertical-tab-switcher.-mobile.-nav-contents>.contents{display:block;-webkit-box-flex:1;flex-grow:1}.vertical-tab-switcher.-nav-contents>.tabs,.vertical-tab-switcher.-mobile.-nav-contents>.tabs{display:none;-webkit-box-flex:0;flex-grow:0;flex-shrink:1}.vertical-tab-switcher.-nav-tabs>.tabs,.vertical-tab-switcher.-mobile.-nav-tabs>.tabs{display:block;-webkit-box-flex:1;flex-grow:1}.vertical-tab-switcher.-nav-tabs>.contents,.vertical-tab-switcher.-mobile.-nav-tabs>.contents{display:none;-webkit-box-flex:0;flex-grow:0;flex-shrink:1}}}.ModifiedIndicator{display:inline-block;position:relative}.modified-tooltip{margin:.5em 1em;min-width:10em;text-align:center}.DraftButtons{display:-webkit-inline-box;display:inline-flex;position:relative;gap:.5em;margin-top:.5em}.draft-tooltip{margin:.5em 1em;min-width:10em;text-align:center}.-mobile .ChoiceSetting.setting-item{display:block}.-mobile .ChoiceSetting.setting-item .setting-label{display:block;margin-bottom:.5em}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
import{H as m,I as u,_,B as f,c as t,o as s,x as w,w as b,J as h,K as p,z as $,a as g}from"./main.AC3URMfQ.js";const k={components:{TabSwitcher:m},data(){return{meta:{stickers:[]},path:""}},computed:{pack(){return this.$store.state.instance.stickers||[]}},methods:{clear(){this.meta={stickers:[]}},pick(a,r){const i=this.$store;fetch(a).then(c=>{c.blob().then(l=>{const d=new File([l],r,{mimetype:"image/png"}),o=new FormData;o.append("file",d),u.uploadMedia({store:i,formData:o}).then(e=>{this.$emit("uploaded",e),this.clear()},e=>{console.warn("Can't attach sticker"),console.warn(e),this.$emit("upload-failed","default")})})})}}},v={class:"sticker-picker"},C=["image-tooltip","image"],y=["onClick"],B=["src"];function x(a,r,i,c,l,d){const o=f("tab-switcher");return s(),t("div",v,[w(o,{class:"tab-switcher","render-only-focused":!0,"scrollable-tabs":""},{default:b(()=>[(s(!0),t(h,null,p(a.pack,e=>(s(),t("div",{key:e.path,"image-tooltip":e.meta.title,image:e.path+e.meta.tabIcon,class:"sticker-picker-content"},[(s(!0),t(h,null,p(e.meta.stickers,n=>(s(),t("div",{key:n,class:"sticker",onClick:$(F=>a.pick(e.path+n,e.meta.title),["stop","prevent"])},[g("img",{src:e.path+n},null,8,B)],8,y))),128))],8,C))),128))]),_:1})])}const D=_(k,[["render",x]]);export{D as default};
//# sourceMappingURL=sticker_picker.rmgSQPc6.js.map
import{H as m,I as u,_,B as f,c as t,o as s,x as w,w as b,J as h,K as p,z as $,a as g}from"./main.qxCxIqDs.js";const k={components:{TabSwitcher:m},data(){return{meta:{stickers:[]},path:""}},computed:{pack(){return this.$store.state.instance.stickers||[]}},methods:{clear(){this.meta={stickers:[]}},pick(a,r){const i=this.$store;fetch(a).then(c=>{c.blob().then(l=>{const d=new File([l],r,{mimetype:"image/png"}),o=new FormData;o.append("file",d),u.uploadMedia({store:i,formData:o}).then(e=>{this.$emit("uploaded",e),this.clear()},e=>{console.warn("Can't attach sticker"),console.warn(e),this.$emit("upload-failed","default")})})})}}},v={class:"sticker-picker"},C=["image-tooltip","image"],y=["onClick"],B=["src"];function x(a,r,i,c,l,d){const o=f("tab-switcher");return s(),t("div",v,[w(o,{class:"tab-switcher","render-only-focused":!0,"scrollable-tabs":""},{default:b(()=>[(s(!0),t(h,null,p(a.pack,e=>(s(),t("div",{key:e.path,"image-tooltip":e.meta.title,image:e.path+e.meta.tabIcon,class:"sticker-picker-content"},[(s(!0),t(h,null,p(e.meta.stickers,n=>(s(),t("div",{key:n,class:"sticker",onClick:$(F=>a.pick(e.path+n,e.meta.title),["stop","prevent"])},[g("img",{src:e.path+n},null,8,B)],8,y))),128))],8,C))),128))]),_:1})])}const D=_(k,[["render",x]]);export{D as default};
//# sourceMappingURL=sticker_picker.B0j2YsOB.js.map

View file

@ -1 +1 @@
{"version":3,"file":"sticker_picker.rmgSQPc6.js","sources":["../../../src/components/sticker_picker/sticker_picker.js?vue&type=script&src=true&lang.js","../../../src/components/sticker_picker/sticker_picker.vue"],"sourcesContent":["/* eslint-env browser */\nimport statusPosterService from '../../services/status_poster/status_poster.service.js'\nimport TabSwitcher from '../tab_switcher/tab_switcher.jsx'\n\nconst StickerPicker = {\n components: {\n TabSwitcher\n },\n data () {\n return {\n meta: {\n stickers: []\n },\n path: ''\n }\n },\n computed: {\n pack () {\n return this.$store.state.instance.stickers || []\n }\n },\n methods: {\n clear () {\n this.meta = {\n stickers: []\n }\n },\n pick (sticker, name) {\n const store = this.$store\n // TODO remove this workaround by finding a way to bypass reuploads\n fetch(sticker)\n .then((res) => {\n res.blob().then((blob) => {\n const file = new File([blob], name, { mimetype: 'image/png' })\n const formData = new FormData()\n formData.append('file', file)\n statusPosterService.uploadMedia({ store, formData })\n .then((fileData) => {\n this.$emit('uploaded', fileData)\n this.clear()\n }, (error) => {\n console.warn(\"Can't attach sticker\")\n console.warn(error)\n this.$emit('upload-failed', 'default')\n })\n })\n })\n }\n }\n}\n\nexport default StickerPicker\n","<template>\n <div\n class=\"sticker-picker\"\n >\n <tab-switcher\n class=\"tab-switcher\"\n :render-only-focused=\"true\"\n scrollable-tabs\n >\n <div\n v-for=\"stickerpack in pack\"\n :key=\"stickerpack.path\"\n :image-tooltip=\"stickerpack.meta.title\"\n :image=\"stickerpack.path + stickerpack.meta.tabIcon\"\n class=\"sticker-picker-content\"\n >\n <div\n v-for=\"sticker in stickerpack.meta.stickers\"\n :key=\"sticker\"\n class=\"sticker\"\n @click.stop.prevent=\"pick(stickerpack.path + sticker, stickerpack.meta.title)\"\n >\n <img\n :src=\"stickerpack.path + sticker\"\n >\n </div>\n </div>\n </tab-switcher>\n </div>\n</template>\n\n<script src=\"./sticker_picker.js\"></script>\n\n<style lang=\"scss\">\n.sticker-picker {\n width: 100%;\n\n .contents {\n min-height: 250px;\n\n .sticker-picker-content {\n display: flex;\n flex-wrap: wrap;\n padding: 0 4px;\n\n .sticker {\n display: flex;\n flex: 1 1 auto;\n margin: 4px;\n width: 56px;\n height: 56px;\n\n img {\n height: 100%;\n\n &:hover {\n filter: drop-shadow(0 0 5px var(--accent));\n }\n }\n }\n }\n }\n}\n\n</style>\n"],"names":["StickerPicker","TabSwitcher","sticker","name","store","res","blob","file","formData","statusPosterService","fileData","error","_hoisted_1","_openBlock","_createElementBlock","_createVNode","_component_tab_switcher","_Fragment","_renderList","_ctx","stickerpack","_withModifiers","$event","_createElementVNode"],"mappings":"+GAIA,MAAMA,EAAgB,CACpB,WAAY,CACV,YAAAC,CACD,EACD,MAAQ,CACN,MAAO,CACL,KAAM,CACJ,SAAU,CAAA,CACX,EACD,KAAM,EACZ,CACG,EACD,SAAU,CACR,MAAQ,CACN,OAAO,KAAK,OAAO,MAAM,SAAS,UAAY,CAAA,CACpD,CACG,EACD,QAAS,CACP,OAAS,CACP,KAAK,KAAO,CACV,SAAU,CAAA,CAClB,CACK,EACD,KAAMC,EAASC,EAAM,CACnB,MAAMC,EAAQ,KAAK,OAEnB,MAAMF,CAAO,EACV,KAAMG,GAAQ,CACbA,EAAI,KAAI,EAAG,KAAMC,GAAS,CACxB,MAAMC,EAAO,IAAI,KAAK,CAACD,CAAI,EAAGH,EAAM,CAAE,SAAU,WAAa,CAAA,EACvDK,EAAW,IAAI,SACrBA,EAAS,OAAO,OAAQD,CAAI,EAC5BE,EAAoB,YAAY,CAAE,MAAAL,EAAO,SAAAI,CAAU,CAAA,EAChD,KAAME,GAAa,CAClB,KAAK,MAAM,WAAYA,CAAQ,EAC/B,KAAK,MAAK,CACX,EAAGC,GAAU,CACZ,QAAQ,KAAK,sBAAsB,EACnC,QAAQ,KAAKA,CAAK,EAClB,KAAK,MAAM,gBAAiB,SAAS,CACtC,CAAA,CACJ,CAAA,CACF,CAAA,CACT,CACA,CACA,EC/CIC,EAAA,CAAA,MAAM,gBAAgB,wGADxB,OAAAC,EAAA,EAAAC,EA2BM,MA3BNF,EA2BM,CAxBJG,EAuBeC,EAAA,CAtBb,MAAM,eACL,sBAAqB,GACtB,kBAAA,eAGE,IAA2B,QAD7BF,EAiBMG,EAAA,KAAAC,EAhBkBC,EAAI,KAAnBC,QADTN,EAiBM,MAAA,CAfH,IAAKM,EAAY,KACjB,gBAAeA,EAAY,KAAK,MAChC,MAAOA,EAAY,KAAOA,EAAY,KAAK,QAC5C,MAAM,4BAENP,EAAA,EAAA,EAAAC,EASMG,SARcG,EAAY,KAAK,SAA5BlB,QADTY,EASM,MAAA,CAPH,IAAKZ,EACN,MAAM,UACL,QAAoBmB,EAAAC,GAAAH,EAAA,KAAKC,EAAY,KAAOlB,EAASkB,EAAY,KAAK,KAAK,EAAA,CAAA,OAAA,SAAA,CAAA,IAE5EG,EAEC,MAAA,CADE,IAAKH,EAAY,KAAOlB"}
{"version":3,"file":"sticker_picker.B0j2YsOB.js","sources":["../../../src/components/sticker_picker/sticker_picker.js?vue&type=script&src=true&lang.js","../../../src/components/sticker_picker/sticker_picker.vue"],"sourcesContent":["/* eslint-env browser */\nimport statusPosterService from '../../services/status_poster/status_poster.service.js'\nimport TabSwitcher from '../tab_switcher/tab_switcher.jsx'\n\nconst StickerPicker = {\n components: {\n TabSwitcher\n },\n data () {\n return {\n meta: {\n stickers: []\n },\n path: ''\n }\n },\n computed: {\n pack () {\n return this.$store.state.instance.stickers || []\n }\n },\n methods: {\n clear () {\n this.meta = {\n stickers: []\n }\n },\n pick (sticker, name) {\n const store = this.$store\n // TODO remove this workaround by finding a way to bypass reuploads\n fetch(sticker)\n .then((res) => {\n res.blob().then((blob) => {\n const file = new File([blob], name, { mimetype: 'image/png' })\n const formData = new FormData()\n formData.append('file', file)\n statusPosterService.uploadMedia({ store, formData })\n .then((fileData) => {\n this.$emit('uploaded', fileData)\n this.clear()\n }, (error) => {\n console.warn(\"Can't attach sticker\")\n console.warn(error)\n this.$emit('upload-failed', 'default')\n })\n })\n })\n }\n }\n}\n\nexport default StickerPicker\n","<template>\n <div\n class=\"sticker-picker\"\n >\n <tab-switcher\n class=\"tab-switcher\"\n :render-only-focused=\"true\"\n scrollable-tabs\n >\n <div\n v-for=\"stickerpack in pack\"\n :key=\"stickerpack.path\"\n :image-tooltip=\"stickerpack.meta.title\"\n :image=\"stickerpack.path + stickerpack.meta.tabIcon\"\n class=\"sticker-picker-content\"\n >\n <div\n v-for=\"sticker in stickerpack.meta.stickers\"\n :key=\"sticker\"\n class=\"sticker\"\n @click.stop.prevent=\"pick(stickerpack.path + sticker, stickerpack.meta.title)\"\n >\n <img\n :src=\"stickerpack.path + sticker\"\n >\n </div>\n </div>\n </tab-switcher>\n </div>\n</template>\n\n<script src=\"./sticker_picker.js\"></script>\n\n<style lang=\"scss\">\n.sticker-picker {\n width: 100%;\n\n .contents {\n min-height: 250px;\n\n .sticker-picker-content {\n display: flex;\n flex-wrap: wrap;\n padding: 0 4px;\n\n .sticker {\n display: flex;\n flex: 1 1 auto;\n margin: 4px;\n width: 56px;\n height: 56px;\n\n img {\n height: 100%;\n\n &:hover {\n filter: drop-shadow(0 0 5px var(--accent));\n }\n }\n }\n }\n }\n}\n\n</style>\n"],"names":["StickerPicker","TabSwitcher","sticker","name","store","res","blob","file","formData","statusPosterService","fileData","error","_hoisted_1","_openBlock","_createElementBlock","_createVNode","_component_tab_switcher","_Fragment","_renderList","_ctx","stickerpack","_withModifiers","$event","_createElementVNode"],"mappings":"+GAIA,MAAMA,EAAgB,CACpB,WAAY,CACV,YAAAC,CACD,EACD,MAAQ,CACN,MAAO,CACL,KAAM,CACJ,SAAU,CAAA,CACX,EACD,KAAM,EACZ,CACG,EACD,SAAU,CACR,MAAQ,CACN,OAAO,KAAK,OAAO,MAAM,SAAS,UAAY,CAAA,CACpD,CACG,EACD,QAAS,CACP,OAAS,CACP,KAAK,KAAO,CACV,SAAU,CAAA,CAClB,CACK,EACD,KAAMC,EAASC,EAAM,CACnB,MAAMC,EAAQ,KAAK,OAEnB,MAAMF,CAAO,EACV,KAAMG,GAAQ,CACbA,EAAI,KAAI,EAAG,KAAMC,GAAS,CACxB,MAAMC,EAAO,IAAI,KAAK,CAACD,CAAI,EAAGH,EAAM,CAAE,SAAU,WAAa,CAAA,EACvDK,EAAW,IAAI,SACrBA,EAAS,OAAO,OAAQD,CAAI,EAC5BE,EAAoB,YAAY,CAAE,MAAAL,EAAO,SAAAI,CAAU,CAAA,EAChD,KAAME,GAAa,CAClB,KAAK,MAAM,WAAYA,CAAQ,EAC/B,KAAK,MAAK,CACX,EAAGC,GAAU,CACZ,QAAQ,KAAK,sBAAsB,EACnC,QAAQ,KAAKA,CAAK,EAClB,KAAK,MAAM,gBAAiB,SAAS,CACtC,CAAA,CACJ,CAAA,CACF,CAAA,CACT,CACA,CACA,EC/CIC,EAAA,CAAA,MAAM,gBAAgB,wGADxB,OAAAC,EAAA,EAAAC,EA2BM,MA3BNF,EA2BM,CAxBJG,EAuBeC,EAAA,CAtBb,MAAM,eACL,sBAAqB,GACtB,kBAAA,eAGE,IAA2B,QAD7BF,EAiBMG,EAAA,KAAAC,EAhBkBC,EAAI,KAAnBC,QADTN,EAiBM,MAAA,CAfH,IAAKM,EAAY,KACjB,gBAAeA,EAAY,KAAK,MAChC,MAAOA,EAAY,KAAOA,EAAY,KAAK,QAC5C,MAAM,4BAENP,EAAA,EAAA,EAAAC,EASMG,SARcG,EAAY,KAAK,SAA5BlB,QADTY,EASM,MAAA,CAPH,IAAKZ,EACN,MAAM,UACL,QAAoBmB,EAAAC,GAAAH,EAAA,KAAKC,EAAY,KAAOlB,EAASkB,EAAY,KAAK,KAAK,EAAA,CAAA,OAAA,SAAA,CAAA,IAE5EG,EAEC,MAAA,CADE,IAAKH,EAAY,KAAOlB"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
(function(){"use strict";self.serviceWorkerOption={assets:["/static/img/nsfw.DepQPhG0.png","/static/css/main.D22XtkBO.css","/static/css/settings_modal.5GFa6N-U.css","/static/css/update_notification.BJ1CAGCw.css","/static/css/sticker_picker.BzJVB0Ta.css","/static/css/settings_modal_user_content.hxNh--rt.css","/static/css/string_setting.B27wX1PR.css","/static/css/settings_modal_admin_content.WeD-61n6.css","/static/js/main.AC3URMfQ.js","/static/js/i18n/ar.Cr-3kZBh.js","/static/js/i18n/ca.Bv4d2Muy.js","/static/js/i18n/cs.EyNXpVXW.js","/static/js/i18n/de.CvXWIhiF.js","/static/js/i18n/eo.C9h09SOv.js","/static/js/i18n/es.BFMlvXsf.js","/static/js/i18n/et.fhuMKZXQ.js","/static/js/i18n/eu.C1UxLEb6.js","/static/js/i18n/fa.BxVyTR8q.js","/static/js/i18n/fi.Brm9lhAA.js","/static/js/i18n/fr.DzBG0KvL.js","/static/js/i18n/ga.CPJnGxWv.js","/static/js/i18n/he.BllNuLoC.js","/static/js/i18n/hu.CljyAvQa.js","/static/js/i18n/id.DLjgbCu5.js","/static/js/i18n/it.ERg696CD.js","/static/js/i18n/ja_easy.PsomvmuF.js","/static/js/i18n/ja_pedantic.VWLd9bHt.js","/static/js/i18n/ko.b1sv0xRp.js","/static/js/i18n/nan-TW.Ci98X1S7.js","/static/js/i18n/nb.DCCmz1gh.js","/static/js/i18n/nl.D6wYIlyz.js","/static/js/i18n/oc.C4DhJxhs.js","/static/js/i18n/pdc.FmFgRqLi.js","/static/js/i18n/pl.CPLK-gPs.js","/static/js/i18n/pt.BzQabObA.js","/static/js/i18n/ro.BA9koejw.js","/static/js/i18n/ru.CYi-PMDA.js","/static/js/i18n/sk.fGdLyyK_.js","/static/js/i18n/te.CikZ4jPW.js","/static/js/i18n/uk.CkmtgYNq.js","/static/js/i18n/vi.BsGK9mjD.js","/static/js/i18n/zh.BZkJuR5j.js","/static/js/i18n/zh_Hant.dSMADUQ9.js","/static/js/emoji.CF2IDMqM.js","/static/js/emoji-annotations/ar.B8mhZA6U.js","/static/js/emoji-annotations/ca.BNs7Pavf.js","/static/js/emoji-annotations/cs.CdaRuLZ2.js","/static/js/emoji-annotations/de.i-ePE-E2.js","/static/js/emoji-annotations/en.UxzeFsjk.js","/static/js/emoji-annotations/es.BgprEtDA.js","/static/js/emoji-annotations/et.RsBIeRrK.js","/static/js/emoji-annotations/eu.DflrXXOX.js","/static/js/emoji-annotations/fi.BQTjfiqL.js","/static/js/emoji-annotations/fr.6uuBHV2n.js","/static/js/emoji-annotations/ga.D-L92xRm.js","/static/js/emoji-annotations/he.Ql7ZB6oR.js","/static/js/emoji-annotations/hu.CfFMlYJN.js","/static/js/emoji-annotations/it.CjUsZ0f4.js","/static/js/emoji-annotations/ja.Cp7hRpKj.js","/static/js/emoji-annotations/ko.DGjjBGsA.js","/static/js/emoji-annotations/nl.BCmP3XAV.js","/static/js/emoji-annotations/pl.C1i62U33.js","/static/js/emoji-annotations/pt.qcD2jbqr.js","/static/js/emoji-annotations/ro.Q0r94aGX.js","/static/js/emoji-annotations/ru.BsjC3M1d.js","/static/js/emoji-annotations/sk.BrZ6jXEe.js","/static/js/emoji-annotations/te.3rQpXN4b.js","/static/js/emoji-annotations/uk.C7RXZT0o.js","/static/js/emoji-annotations/zh.DXJ_1nIQ.js","/static/js/emoji-annotations/zh_Hant.ccXyIXaI.js","/static/js/settings_modal.Hse38PiB.js","/static/js/update_notification.CZcx2OQ7.js","/static/js/sticker_picker.rmgSQPc6.js","/static/js/settings_modal_user_content.DPmqx1OJ.js","/static/js/string_setting.5SBT91w5.js","/static/js/settings_modal_admin_content.k7LAvjl-.js","/index.html"]};var ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function un(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Dn={exports:{}};/*!
(function(){"use strict";self.serviceWorkerOption={assets:["/static/img/nsfw.DepQPhG0.png","/static/css/main.CF7uYwoC.css","/static/css/settings_modal.dQ5YFZGx.css","/static/css/update_notification.BJ1CAGCw.css","/static/css/sticker_picker.BzJVB0Ta.css","/static/css/settings_modal_user_content.7KpKOwxU.css","/static/css/string_setting.CtukauKH.css","/static/css/settings_modal_admin_content.d1pRGdhX.css","/static/js/main.qxCxIqDs.js","/static/js/i18n/ar.Cr-3kZBh.js","/static/js/i18n/ca.Bv4d2Muy.js","/static/js/i18n/cs.EyNXpVXW.js","/static/js/i18n/de.CvXWIhiF.js","/static/js/i18n/eo.C9h09SOv.js","/static/js/i18n/es.BFMlvXsf.js","/static/js/i18n/et.fhuMKZXQ.js","/static/js/i18n/eu.C1UxLEb6.js","/static/js/i18n/fa.BxVyTR8q.js","/static/js/i18n/fi.Brm9lhAA.js","/static/js/i18n/fr.DzBG0KvL.js","/static/js/i18n/ga.CPJnGxWv.js","/static/js/i18n/he.BllNuLoC.js","/static/js/i18n/hu.CljyAvQa.js","/static/js/i18n/id.DLjgbCu5.js","/static/js/i18n/it.ERg696CD.js","/static/js/i18n/ja_easy.PsomvmuF.js","/static/js/i18n/ja_pedantic.VWLd9bHt.js","/static/js/i18n/ko.b1sv0xRp.js","/static/js/i18n/nan-TW.Ci98X1S7.js","/static/js/i18n/nb.DCCmz1gh.js","/static/js/i18n/nl.D6wYIlyz.js","/static/js/i18n/oc.C4DhJxhs.js","/static/js/i18n/pdc.FmFgRqLi.js","/static/js/i18n/pl.CPLK-gPs.js","/static/js/i18n/pt.BzQabObA.js","/static/js/i18n/ro.BA9koejw.js","/static/js/i18n/ru.CYi-PMDA.js","/static/js/i18n/sk.fGdLyyK_.js","/static/js/i18n/te.CikZ4jPW.js","/static/js/i18n/uk.CkmtgYNq.js","/static/js/i18n/vi.BsGK9mjD.js","/static/js/i18n/zh.BZkJuR5j.js","/static/js/i18n/zh_Hant.dSMADUQ9.js","/static/js/emoji.CF2IDMqM.js","/static/js/emoji-annotations/ar.B8mhZA6U.js","/static/js/emoji-annotations/ca.BNs7Pavf.js","/static/js/emoji-annotations/cs.CdaRuLZ2.js","/static/js/emoji-annotations/de.i-ePE-E2.js","/static/js/emoji-annotations/en.UxzeFsjk.js","/static/js/emoji-annotations/es.BgprEtDA.js","/static/js/emoji-annotations/et.RsBIeRrK.js","/static/js/emoji-annotations/eu.DflrXXOX.js","/static/js/emoji-annotations/fi.BQTjfiqL.js","/static/js/emoji-annotations/fr.6uuBHV2n.js","/static/js/emoji-annotations/ga.D-L92xRm.js","/static/js/emoji-annotations/he.Ql7ZB6oR.js","/static/js/emoji-annotations/hu.CfFMlYJN.js","/static/js/emoji-annotations/it.CjUsZ0f4.js","/static/js/emoji-annotations/ja.Cp7hRpKj.js","/static/js/emoji-annotations/ko.DGjjBGsA.js","/static/js/emoji-annotations/nl.BCmP3XAV.js","/static/js/emoji-annotations/pl.C1i62U33.js","/static/js/emoji-annotations/pt.qcD2jbqr.js","/static/js/emoji-annotations/ro.Q0r94aGX.js","/static/js/emoji-annotations/ru.BsjC3M1d.js","/static/js/emoji-annotations/sk.BrZ6jXEe.js","/static/js/emoji-annotations/te.3rQpXN4b.js","/static/js/emoji-annotations/uk.C7RXZT0o.js","/static/js/emoji-annotations/zh.DXJ_1nIQ.js","/static/js/emoji-annotations/zh_Hant.ccXyIXaI.js","/static/js/settings_modal.B74APXc5.js","/static/js/update_notification.DdDhzBg0.js","/static/js/sticker_picker.B0j2YsOB.js","/static/js/settings_modal_user_content.D-dohGjw.js","/static/js/string_setting.QmUmmIFY.js","/static/js/settings_modal_admin_content.DWMrR-Cb.js","/index.html"]};var ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function un(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Dn={exports:{}};/*!
localForage -- Offline Storage, Improved
Version 1.10.0
https://localforage.github.io/localForage