Merge remote-tracking branch 'upstream/develop' into feature/move-activity
This commit is contained in:
commit
3c0abfca53
118 changed files with 4497 additions and 1295 deletions
|
|
@ -8,10 +8,10 @@ defmodule Pleroma.Repo.Migrations.MigrateOldBookmarks do
|
|||
|
||||
def up do
|
||||
query =
|
||||
from(u in User,
|
||||
from(u in "users",
|
||||
where: u.local == true,
|
||||
where: fragment("array_length(bookmarks, 1)") > 0,
|
||||
select: %{id: u.id, bookmarks: fragment("bookmarks")}
|
||||
where: fragment("array_length(?, 1)", u.bookmarks) > 0,
|
||||
select: %{id: u.id, bookmarks: u.bookmarks}
|
||||
)
|
||||
|
||||
Repo.stream(query)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddDefaultsToTables do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute("ALTER TABLE activities
|
||||
ALTER COLUMN recipients SET DEFAULT ARRAY[]::character varying[]")
|
||||
|
||||
execute("ALTER TABLE filters
|
||||
ALTER COLUMN whole_word SET DEFAULT true")
|
||||
|
||||
execute("ALTER TABLE push_subscriptions
|
||||
ALTER COLUMN data SET DEFAULT '{}'::jsonb")
|
||||
|
||||
execute(~s(ALTER TABLE users
|
||||
ALTER COLUMN tags SET DEFAULT ARRAY[]::character varying[],
|
||||
ALTER COLUMN notification_settings SET DEFAULT
|
||||
'{"followers": true, "follows": true, "non_follows": true, "non_followers": true}'::jsonb))
|
||||
|
||||
# irreversible updates
|
||||
|
||||
execute(
|
||||
"UPDATE activities SET recipients = ARRAY[]::character varying[] WHERE recipients IS NULL"
|
||||
)
|
||||
|
||||
execute("UPDATE filters SET whole_word = true WHERE whole_word IS NULL")
|
||||
|
||||
execute("UPDATE push_subscriptions SET data = '{}'::jsonb WHERE data IS NULL")
|
||||
|
||||
execute("UPDATE users SET source_data = '{}'::jsonb where source_data IS NULL")
|
||||
execute("UPDATE users SET note_count = 0 where note_count IS NULL")
|
||||
execute("UPDATE users SET background = '{}'::jsonb where background IS NULL")
|
||||
execute("UPDATE users SET follower_count = 0 where follower_count IS NULL")
|
||||
|
||||
execute(
|
||||
"UPDATE users SET unread_conversation_count = 0 where unread_conversation_count IS NULL"
|
||||
)
|
||||
|
||||
execute(
|
||||
~s(UPDATE users SET email_notifications = '{"digest": false}'::jsonb where email_notifications IS NULL)
|
||||
)
|
||||
|
||||
execute("UPDATE users SET default_scope = 'public' where default_scope IS NULL")
|
||||
|
||||
execute(
|
||||
"UPDATE users SET pleroma_settings_store = '{}'::jsonb where pleroma_settings_store IS NULL"
|
||||
)
|
||||
|
||||
execute("UPDATE users SET tags = ARRAY[]::character varying[] WHERE tags IS NULL")
|
||||
execute(~s(UPDATE users SET notification_settings =
|
||||
'{"followers": true, "follows": true, "non_follows": true, "non_followers": true}'::jsonb
|
||||
WHERE notification_settings = '{}'::jsonb))
|
||||
end
|
||||
|
||||
def down do
|
||||
execute("ALTER TABLE activities
|
||||
ALTER COLUMN recipients DROP DEFAULT")
|
||||
|
||||
execute("ALTER TABLE filters
|
||||
ALTER COLUMN whole_word DROP DEFAULT")
|
||||
|
||||
execute("ALTER TABLE push_subscriptions
|
||||
ALTER COLUMN data DROP DEFAULT")
|
||||
|
||||
execute("ALTER TABLE users
|
||||
ALTER COLUMN tags DROP DEFAULT,
|
||||
ALTER COLUMN notification_settings SET DEFAULT '{}'::jsonb")
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
defmodule Pleroma.Repo.Migrations.MigrateMissingFollowingRelationships do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
execute(import_pending_follows_from_activities(), "")
|
||||
end
|
||||
|
||||
defp import_pending_follows_from_activities do
|
||||
"""
|
||||
INSERT INTO
|
||||
following_relationships (
|
||||
follower_id,
|
||||
following_id,
|
||||
state,
|
||||
inserted_at,
|
||||
updated_at
|
||||
)
|
||||
SELECT
|
||||
followers.id,
|
||||
following.id,
|
||||
activities.data ->> 'state',
|
||||
(activities.data ->> 'published') :: timestamp,
|
||||
now()
|
||||
FROM
|
||||
activities
|
||||
JOIN users AS followers ON (activities.actor = followers.ap_id)
|
||||
JOIN users AS following ON (activities.data ->> 'object' = following.ap_id)
|
||||
WHERE
|
||||
activities.data ->> 'type' = 'Follow'
|
||||
AND activities.data ->> 'state' = 'pending'
|
||||
ORDER BY activities.updated_at DESC
|
||||
ON CONFLICT DO NOTHING
|
||||
"""
|
||||
end
|
||||
end
|
||||
112
priv/repo/migrations/20191029172832_fix_blocked_follows.exs
Normal file
112
priv/repo/migrations/20191029172832_fix_blocked_follows.exs
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
defmodule Pleroma.Repo.Migrations.FixBlockedFollows do
|
||||
use Ecto.Migration
|
||||
|
||||
import Ecto.Query
|
||||
alias Pleroma.Config
|
||||
alias Pleroma.Repo
|
||||
|
||||
def up do
|
||||
unfollow_blocked = Config.get([:activitypub, :unfollow_blocked])
|
||||
|
||||
if unfollow_blocked do
|
||||
"activities"
|
||||
|> where([activity], fragment("? ->> 'type' = 'Block'", activity.data))
|
||||
|> distinct([activity], [
|
||||
activity.actor,
|
||||
fragment(
|
||||
"coalesce((?)->'object'->>'id', (?)->>'object')",
|
||||
activity.data,
|
||||
activity.data
|
||||
)
|
||||
])
|
||||
|> order_by([activity], [fragment("? desc nulls last", activity.id)])
|
||||
|> select([activity], %{
|
||||
blocker: activity.actor,
|
||||
blocked:
|
||||
fragment("coalesce((?)->'object'->>'id', (?)->>'object')", activity.data, activity.data),
|
||||
created_at: activity.id
|
||||
})
|
||||
|> Repo.stream()
|
||||
|> Enum.map(&unfollow_if_blocked/1)
|
||||
|> Enum.uniq()
|
||||
|> Enum.each(&update_follower_count/1)
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
end
|
||||
|
||||
def unfollow_if_blocked(%{blocker: blocker_id, blocked: blocked_id, created_at: blocked_at}) do
|
||||
query =
|
||||
from(
|
||||
activity in "activities",
|
||||
where: fragment("? ->> 'type' = 'Follow'", activity.data),
|
||||
where: activity.actor == ^blocked_id,
|
||||
# this is to use the index
|
||||
where:
|
||||
fragment(
|
||||
"coalesce((?)->'object'->>'id', (?)->>'object') = ?",
|
||||
activity.data,
|
||||
activity.data,
|
||||
^blocker_id
|
||||
),
|
||||
where: activity.id > ^blocked_at,
|
||||
where: fragment("(?)->>'state' = 'accept'", activity.data),
|
||||
order_by: [fragment("? desc nulls last", activity.id)]
|
||||
)
|
||||
|
||||
unless Repo.exists?(query) do
|
||||
blocker = "users" |> select([:id, :local]) |> Repo.get_by(ap_id: blocker_id)
|
||||
blocked = "users" |> select([:id]) |> Repo.get_by(ap_id: blocked_id)
|
||||
|
||||
if !is_nil(blocker) && !is_nil(blocked) do
|
||||
unfollow(blocked, blocker)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def unfollow(%{id: follower_id}, %{id: followed_id} = followed) do
|
||||
following_relationship =
|
||||
"following_relationships"
|
||||
|> where(follower_id: ^follower_id, following_id: ^followed_id, state: "accept")
|
||||
|> select([:id])
|
||||
|> Repo.one()
|
||||
|
||||
case following_relationship do
|
||||
nil ->
|
||||
{:ok, nil}
|
||||
|
||||
%{id: following_relationship_id} ->
|
||||
"following_relationships"
|
||||
|> where(id: ^following_relationship_id)
|
||||
|> Repo.delete_all()
|
||||
|
||||
followed
|
||||
end
|
||||
end
|
||||
|
||||
def update_follower_count(%{id: user_id} = user) do
|
||||
if user.local or !Pleroma.Config.get([:instance, :external_user_synchronization]) do
|
||||
follower_count_query =
|
||||
"users"
|
||||
|> where([u], u.id != ^user_id)
|
||||
|> where([u], u.deactivated != ^true)
|
||||
|> join(:inner, [u], r in "following_relationships",
|
||||
as: :relationships,
|
||||
on: r.following_id == ^user_id and r.follower_id == u.id
|
||||
)
|
||||
|> where([relationships: r], r.state == "accept")
|
||||
|> select([u], %{count: count(u.id)})
|
||||
|
||||
"users"
|
||||
|> where(id: ^user_id)
|
||||
|> join(:inner, [u], s in subquery(follower_count_query))
|
||||
|> update([u, s],
|
||||
set: [follower_count: s.count]
|
||||
)
|
||||
|> Repo.update_all([])
|
||||
end
|
||||
end
|
||||
|
||||
def update_follower_count(_), do: :noop
|
||||
end
|
||||
|
|
@ -1 +1 @@
|
|||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><title>Pleroma</title><!--server-generated-meta--><link rel=icon type=image/png href=/favicon.png><link rel=stylesheet href=/static/font/css/fontello.css><link rel=stylesheet href=/static/font/css/animation.css><link href=/static/css/vendors~app.b2603a50868c68a1c192.css rel=stylesheet><link href=/static/css/app.4e8e80a2f95232cff399.css rel=stylesheet></head><body class=hidden><noscript>To use Pleroma, please enable JavaScript.</noscript><div id=app></div><script type=text/javascript src=/static/js/vendors~app.24e6ba2d196f6210feda.js></script><script type=text/javascript src=/static/js/app.4ab7097a5650339b9e3d.js></script></body></html>
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><title>Pleroma</title><!--server-generated-meta--><link rel=icon type=image/png href=/favicon.png><link rel=stylesheet href=/static/font/css/fontello.css><link rel=stylesheet href=/static/font/css/animation.css><link href=/static/css/vendors~app.b2603a50868c68a1c192.css rel=stylesheet><link href=/static/css/app.fd71461124f3eb029b1b.css rel=stylesheet></head><body class=hidden><noscript>To use Pleroma, please enable JavaScript.</noscript><div id=app></div><script type=text/javascript src=/static/js/vendors~app.5c3fab032deb5f2793cb.js></script><script type=text/javascript src=/static/js/app.105d64a8fcdd6724ccde.js></script></body></html>
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
"@id": "litepub:oauthRegistrationEndpoint",
|
||||
"@type": "@id"
|
||||
},
|
||||
"EmojiReaction": "litepub:EmojiReaction",
|
||||
"alsoKnownAs": {
|
||||
"@id": "as:alsoKnownAs",
|
||||
"@type": "@id"
|
||||
|
|
|
|||
|
|
@ -99,4 +99,4 @@
|
|||
font-size: 14px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=app.4e8e80a2f95232cff399.css.map*/
|
||||
/*# sourceMappingURL=app.fd71461124f3eb029b1b.css.map*/
|
||||
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["webpack:///./src/hocs/with_load_more/with_load_more.scss","webpack:///./src/components/tab_switcher/tab_switcher.scss","webpack:///./src/hocs/with_subscription/with_subscription.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;AClFA;AACA;AACA;AACA;AACA;AACA;AACA,C","file":"static/css/app.4e8e80a2f95232cff399.css","sourcesContent":[".with-load-more-footer {\n padding: 10px;\n text-align: center;\n border-top: 1px solid;\n border-top-color: #222;\n border-top-color: var(--border, #222);\n}\n.with-load-more-footer .error {\n font-size: 14px;\n}",".tab-switcher {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.tab-switcher .contents {\n -ms-flex: 1 0 auto;\n flex: 1 0 auto;\n min-height: 0px;\n}\n.tab-switcher .contents .hidden {\n display: none;\n}\n.tab-switcher .contents.scrollable-tabs {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n overflow-y: auto;\n}\n.tab-switcher .tabs {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n padding-top: 5px;\n box-sizing: border-box;\n}\n.tab-switcher .tabs::after, .tab-switcher .tabs::before {\n display: block;\n content: \"\";\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}\n.tab-switcher .tabs .tab-wrapper {\n height: 28px;\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.tab-switcher .tabs .tab-wrapper .tab {\n width: 100%;\n min-width: 1px;\n position: relative;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 6px 1em;\n padding-bottom: 99px;\n margin-bottom: -93px;\n white-space: nowrap;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active) {\n z-index: 4;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active):hover {\n z-index: 6;\n}\n.tab-switcher .tabs .tab-wrapper .tab.active {\n background: transparent;\n z-index: 5;\n}\n.tab-switcher .tabs .tab-wrapper .tab img {\n max-height: 26px;\n vertical-align: top;\n margin-top: -5px;\n}\n.tab-switcher .tabs .tab-wrapper:not(.active)::after {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}",".with-subscription-loading {\n padding: 10px;\n text-align: center;\n}\n.with-subscription-loading .error {\n font-size: 14px;\n}"],"sourceRoot":""}
|
||||
{"version":3,"sources":["webpack:///./src/hocs/with_load_more/with_load_more.scss","webpack:///./src/components/tab_switcher/tab_switcher.scss","webpack:///./src/hocs/with_subscription/with_subscription.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;AClFA;AACA;AACA;AACA;AACA;AACA;AACA,C","file":"static/css/app.fd71461124f3eb029b1b.css","sourcesContent":[".with-load-more-footer {\n padding: 10px;\n text-align: center;\n border-top: 1px solid;\n border-top-color: #222;\n border-top-color: var(--border, #222);\n}\n.with-load-more-footer .error {\n font-size: 14px;\n}",".tab-switcher {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.tab-switcher .contents {\n -ms-flex: 1 0 auto;\n flex: 1 0 auto;\n min-height: 0px;\n}\n.tab-switcher .contents .hidden {\n display: none;\n}\n.tab-switcher .contents.scrollable-tabs {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n overflow-y: auto;\n}\n.tab-switcher .tabs {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n padding-top: 5px;\n box-sizing: border-box;\n}\n.tab-switcher .tabs::after, .tab-switcher .tabs::before {\n display: block;\n content: \"\";\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}\n.tab-switcher .tabs .tab-wrapper {\n height: 28px;\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.tab-switcher .tabs .tab-wrapper .tab {\n width: 100%;\n min-width: 1px;\n position: relative;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 6px 1em;\n padding-bottom: 99px;\n margin-bottom: -93px;\n white-space: nowrap;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active) {\n z-index: 4;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active):hover {\n z-index: 6;\n}\n.tab-switcher .tabs .tab-wrapper .tab.active {\n background: transparent;\n z-index: 5;\n}\n.tab-switcher .tabs .tab-wrapper .tab img {\n max-height: 26px;\n vertical-align: top;\n margin-top: -5px;\n}\n.tab-switcher .tabs .tab-wrapper:not(.active)::after {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}",".with-subscription-loading {\n padding: 10px;\n text-align: center;\n}\n.with-subscription-loading .error {\n font-size: 14px;\n}"],"sourceRoot":""}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{987:function(t,e,i){"use strict";i.r(e);var n=i(988),c=i.n(n);for(var r in n)"default"!==r&&function(t){i.d(e,t,function(){return n[t]})}(r);var a=i(991),s=i(0);var o=function(t){i(989)},u=Object(s.a)(c.a,a.a,a.b,!1,o,null,null);e.default=u.exports},988:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=c(i(332));function c(t){return t&&t.__esModule?t:{default:t}}var r={components:{TabSwitcher:c(i(197)).default},data:function(){return{meta:{stickers:[]},path:""}},computed:{pack:function(){return this.$store.state.instance.stickers||[]}},methods:{clear:function(){this.meta={stickers:[]}},pick:function(t,e){var i=this,c=this.$store;fetch(t).then(function(t){t.blob().then(function(t){var r=new File([t],e,{mimetype:"image/png"}),a=new FormData;a.append("file",r),n.default.uploadMedia({store:c,formData:a}).then(function(t){i.$emit("uploaded",t),i.clear()},function(t){console.warn("Can't attach sticker"),console.warn(t),i.$emit("upload-failed","default")})})})}}};e.default=r},989:function(t,e,i){var n=i(990);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,i(2).default)("cc6cdea4",n,!0,{})},990:function(t,e,i){(t.exports=i(1)(!1)).push([t.i,".sticker-picker{width:100%;position:relative}.sticker-picker .tab-switcher{position:absolute;top:0;bottom:0;left:0;right:0}.sticker-picker .sticker-picker-content .sticker{display:inline-block;width:20%;height:20%}.sticker-picker .sticker-picker-content .sticker img{width:100%}.sticker-picker .sticker-picker-content .sticker img:hover{filter:drop-shadow(0 0 5px var(--link,#d8a070))}",""])},991:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return c});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"sticker-picker"},[i("tab-switcher",{staticClass:"tab-switcher",attrs:{"render-only-focused":!0,"scrollable-tabs":""}},t._l(t.pack,function(e){return i("div",{key:e.path,staticClass:"sticker-picker-content",attrs:{"image-tooltip":e.meta.title,image:e.path+e.meta.tabIcon}},t._l(e.meta.stickers,function(n){return i("div",{key:n,staticClass:"sticker",on:{click:function(i){i.stopPropagation(),i.preventDefault(),t.pick(e.path+n,e.meta.title)}}},[i("img",{attrs:{src:e.path+n}})])}),0)}),0)],1)},c=[]}}]);
|
||||
//# sourceMappingURL=2.48f39bc510b7c0a7fca6.js.map
|
||||
2
priv/static/static/js/2.73375b727cef616c59b4.js
Normal file
2
priv/static/static/js/2.73375b727cef616c59b4.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1012:function(t,e,i){"use strict";i.r(e);var n=i(1013),c=i.n(n);for(var r in n)"default"!==r&&function(t){i.d(e,t,function(){return n[t]})}(r);var a=i(1016),s=i(0);var o=function(t){i(1014)},u=Object(s.a)(c.a,a.a,a.b,!1,o,null,null);e.default=u.exports},1013:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=c(i(348));function c(t){return t&&t.__esModule?t:{default:t}}var r={components:{TabSwitcher:c(i(205)).default},data:function(){return{meta:{stickers:[]},path:""}},computed:{pack:function(){return this.$store.state.instance.stickers||[]}},methods:{clear:function(){this.meta={stickers:[]}},pick:function(t,e){var i=this,c=this.$store;fetch(t).then(function(t){t.blob().then(function(t){var r=new File([t],e,{mimetype:"image/png"}),a=new FormData;a.append("file",r),n.default.uploadMedia({store:c,formData:a}).then(function(t){i.$emit("uploaded",t),i.clear()},function(t){console.warn("Can't attach sticker"),console.warn(t),i.$emit("upload-failed","default")})})})}}};e.default=r},1014:function(t,e,i){var n=i(1015);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,i(2).default)("cc6cdea4",n,!0,{})},1015:function(t,e,i){(t.exports=i(1)(!1)).push([t.i,".sticker-picker{width:100%;position:relative}.sticker-picker .tab-switcher{position:absolute;top:0;bottom:0;left:0;right:0}.sticker-picker .sticker-picker-content .sticker{display:inline-block;width:20%;height:20%}.sticker-picker .sticker-picker-content .sticker img{width:100%}.sticker-picker .sticker-picker-content .sticker img:hover{filter:drop-shadow(0 0 5px var(--link,#d8a070))}",""])},1016:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return c});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"sticker-picker"},[i("tab-switcher",{staticClass:"tab-switcher",attrs:{"render-only-focused":!0,"scrollable-tabs":""}},t._l(t.pack,function(e){return i("div",{key:e.path,staticClass:"sticker-picker-content",attrs:{"image-tooltip":e.meta.title,image:e.path+e.meta.tabIcon}},t._l(e.meta.stickers,function(n){return i("div",{key:n,staticClass:"sticker",on:{click:function(i){i.stopPropagation(),i.preventDefault(),t.pick(e.path+n,e.meta.title)}}},[i("img",{attrs:{src:e.path+n}})])}),0)}),0)],1)},c=[]}}]);
|
||||
//# sourceMappingURL=2.73375b727cef616c59b4.js.map
|
||||
File diff suppressed because one or more lines are too long
2
priv/static/static/js/app.105d64a8fcdd6724ccde.js
Normal file
2
priv/static/static/js/app.105d64a8fcdd6724ccde.js
Normal file
File diff suppressed because one or more lines are too long
1
priv/static/static/js/app.105d64a8fcdd6724ccde.js.map
Normal file
1
priv/static/static/js/app.105d64a8fcdd6724ccde.js.map
Normal file
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
176
priv/static/static/static-fe.css
Normal file
176
priv/static/static/static-fe.css
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
body {
|
||||
background-color: #282c37;
|
||||
font-family: sans-serif;
|
||||
color: white;
|
||||
}
|
||||
|
||||
main {
|
||||
margin: 50px auto;
|
||||
max-width: 960px;
|
||||
padding: 40px;
|
||||
background-color: #313543;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
header {
|
||||
margin: 50px auto;
|
||||
max-width: 960px;
|
||||
padding: 40px;
|
||||
background-color: #313543;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.activity {
|
||||
border-radius: 4px;
|
||||
padding: 1em;
|
||||
padding-bottom: 2em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.avatar img {
|
||||
float: left;
|
||||
border-radius: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.activity-content img, video, audio {
|
||||
padding: 1em;
|
||||
max-width: 800px;
|
||||
max-height: 800px;
|
||||
}
|
||||
|
||||
#selected {
|
||||
background-color: #1b2735;
|
||||
}
|
||||
|
||||
.counts dt, .counts dd {
|
||||
float: left;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.h-card {
|
||||
min-height: 48px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
header a, .h-card a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header a:hover, .h-card a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.display-name {
|
||||
padding-top: 4px;
|
||||
display: block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* keep emoji from being hilariously huge */
|
||||
.display-name img {
|
||||
max-height: 1em;
|
||||
}
|
||||
|
||||
.display-name .nickname {
|
||||
padding-top: 4px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nickname:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
margin: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #9baec8;
|
||||
font-weight: normal;
|
||||
font-size: 20px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin-top: 20px;
|
||||
background-color: rgba(0,0,0,.1);
|
||||
color: white;
|
||||
border: 0;
|
||||
border-bottom: 2px solid #9baec8;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
border-bottom: 2px solid #4b8ed8;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
button {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
color: white;
|
||||
background-color: #419bdd;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
padding: 10px;
|
||||
margin-top: 30px;
|
||||
text-transform: uppercase;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
color: #D8000C;
|
||||
background-color: #FFD2D2;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
padding: 10px;
|
||||
margin-top: 20px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
color: #00529B;
|
||||
background-color: #BDE5F8;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
padding: 10px;
|
||||
margin-top: 20px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
|
@ -5,11 +5,11 @@
|
|||
"bird": [ "Bird", "#f8fafd", "#e6ecf0", "#14171a", "#0084b8", "#e0245e", "#17bf63", "#1b95e0", "#fab81e"],
|
||||
"ir-black": [ "Ir Black", "#000000", "#242422", "#b5b3aa", "#ff6c60", "#FF6C60", "#A8FF60", "#96CBFE", "#FFFFB6" ],
|
||||
"monokai": [ "Monokai", "#272822", "#383830", "#f8f8f2", "#f92672", "#F92672", "#a6e22e", "#66d9ef", "#f4bf75" ],
|
||||
"mammal": [ "Mammal", "#272c37", "#444b5d", "#f8f8f8", "#9bacc8", "#7f3142", "#2bd850", "#2b90d9", "#ca8f04" ],
|
||||
|
||||
"redmond-xx": "/static/themes/redmond-xx.json",
|
||||
"redmond-xx-se": "/static/themes/redmond-xx-se.json",
|
||||
"redmond-xxi": "/static/themes/redmond-xxi.json",
|
||||
"breezy-dark": "/static/themes/breezy-dark.json",
|
||||
"breezy-light": "/static/themes/breezy-light.json"
|
||||
"breezy-light": "/static/themes/breezy-light.json",
|
||||
"mammal": "/static/themes/mammal.json"
|
||||
}
|
||||
|
|
|
|||
57
priv/static/static/themes/mammal.json
Normal file
57
priv/static/static/themes/mammal.json
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"_pleroma_theme_version": 2,
|
||||
"name": "Mammal",
|
||||
"theme": {
|
||||
"shadows": {
|
||||
"button": [],
|
||||
"buttonHover": [
|
||||
{
|
||||
"x": "0",
|
||||
"y": "0",
|
||||
"blur": "0",
|
||||
"spread": 1024,
|
||||
"color": "#56a7e1",
|
||||
"alpha": "1",
|
||||
"inset": true
|
||||
}
|
||||
],
|
||||
"buttonPressed": [
|
||||
{
|
||||
"x": "0",
|
||||
"y": "0",
|
||||
"blur": "0",
|
||||
"spread": 1024,
|
||||
"color": "#56a7e1",
|
||||
"alpha": "1",
|
||||
"inset": true
|
||||
}
|
||||
],
|
||||
"panel": [],
|
||||
"panelHeader": [],
|
||||
"topBar": []
|
||||
},
|
||||
"opacity": { "input": "1" },
|
||||
"colors": {
|
||||
"bg": "#282c37",
|
||||
"text": "#f8f8f8",
|
||||
"link": "#9bacc8",
|
||||
"fg": "#444b5d",
|
||||
"input": "#FFFFFF",
|
||||
"inputText": "#282c37",
|
||||
"btn": "#2b90d9",
|
||||
"btnText": "#FFFFFF",
|
||||
"cRed": "#7f3142",
|
||||
"cBlue": "#2b90d9",
|
||||
"cGreen": "#2bd850",
|
||||
"cOrange": "#ca8f04"
|
||||
},
|
||||
"radii": {
|
||||
"btn": 4,
|
||||
"input": 4,
|
||||
"panel": "0",
|
||||
"avatar": "4",
|
||||
"avatarAlt": "4",
|
||||
"attachment": "4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
var serviceWorkerOption = {"assets":["/static/img/nsfw.74818f9.png","/static/css/app.4e8e80a2f95232cff399.css","/static/js/app.4ab7097a5650339b9e3d.js","/static/css/vendors~app.b2603a50868c68a1c192.css","/static/js/vendors~app.24e6ba2d196f6210feda.js","/static/js/2.48f39bc510b7c0a7fca6.js"]};
|
||||
var serviceWorkerOption = {"assets":["/static/img/nsfw.74818f9.png","/static/css/app.fd71461124f3eb029b1b.css","/static/js/app.105d64a8fcdd6724ccde.js","/static/css/vendors~app.b2603a50868c68a1c192.css","/static/js/vendors~app.5c3fab032deb5f2793cb.js","/static/js/2.73375b727cef616c59b4.js"]};
|
||||
|
||||
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/",t(t.s=0)}([function(e,n,t){"use strict";var r,o=t(1),i=(r=o)&&r.__esModule?r:{default:r};function a(){return clients.matchAll({includeUncontrolled:!0}).then(function(e){return e.filter(function(e){return"window"===e.type})})}self.addEventListener("push",function(e){e.data&&e.waitUntil(i.default.getItem("vuex-lz").then(function(e){return e.config.webPushNotifications}).then(function(n){return n&&a().then(function(n){var t=e.data.json();if(0===n.length)return self.registration.showNotification(t.title,t)})}))}),self.addEventListener("notificationclick",function(e){e.notification.close(),e.waitUntil(a().then(function(e){for(var n=0;n<e.length;n++){var t=e[n];if("/"===t.url&&"focus"in t)return t.focus()}if(clients.openWindow)return clients.openWindow("/")}))})},function(e,n){
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue