Merge remote-tracking branch 'origin/develop' into webv2

This commit is contained in:
Gabe Kangas
2022-05-25 22:57:14 -07:00
148 changed files with 244 additions and 134 deletions

View File

@@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
only-new-issues: true
args: --timeout=3m

View File

@@ -20,7 +20,7 @@ func CreateCreateActivity(id string, localAccountIRI *url.URL) vocab.ActivityStr
}
// AddImageAttachmentToNote will add the provided image URL to the provided note object.
func AddImageAttachmentToNote(note vocab.ActivityStreamsNote, image string) {
func AddImageAttachmentToNote(note vocab.ActivityStreamsNote, image, mediaType string) {
imageURL, err := url.Parse(image)
if err != nil {
return
@@ -40,9 +40,13 @@ func AddImageAttachmentToNote(note vocab.ActivityStreamsNote, image string) {
imageProp := streams.NewActivityStreamsImageProperty()
imageProp.AppendActivityStreamsImage(apImage)
imageDescription := streams.NewActivityStreamsContentProperty()
imageDescription := streams.NewActivityStreamsNameProperty()
imageDescription.AppendXMLSchemaString("Live stream preview")
apImage.SetActivityStreamsContent(imageDescription)
apImage.SetActivityStreamsName(imageDescription)
mediaTypeProperty := streams.NewActivityStreamsMediaTypeProperty()
mediaTypeProperty.Set(mediaType)
apImage.SetActivityStreamsMediaType(mediaTypeProperty)
attachments.AppendActivityStreamsImage(apImage)

View File

@@ -59,6 +59,13 @@ func NodeInfoController(w http.ResponseWriter, r *http.Request) {
// NodeInfoV2Controller returns the V2 node info response.
func NodeInfoV2Controller(w http.ResponseWriter, r *http.Request) {
type metadata struct {
ChatEnabled bool `json:"chat_enabled"`
}
type services struct {
Outbound []string `json:"outbound"`
Inbound []string `json:"inbound"`
}
type software struct {
Name string `json:"name"`
Version string `json:"version"`
@@ -74,10 +81,12 @@ func NodeInfoV2Controller(w http.ResponseWriter, r *http.Request) {
}
type response struct {
Version string `json:"version"`
Services services `json:"services"`
Software software `json:"software"`
Protocols []string `json:"protocols"`
Usage usage `json:"usage"`
OpenRegistrations bool `json:"openRegistrations"`
Metadata metadata `json:"metadata"`
}
if !data.GetFederationEnabled() {
@@ -89,8 +98,12 @@ func NodeInfoV2Controller(w http.ResponseWriter, r *http.Request) {
res := response{
Version: "2.0",
Services: services{
Inbound: []string{},
Outbound: []string{},
},
Software: software{
Name: "Owncast",
Name: "owncast",
Version: config.VersionNumber,
},
Usage: usage{
@@ -103,6 +116,9 @@ func NodeInfoV2Controller(w http.ResponseWriter, r *http.Request) {
},
OpenRegistrations: false,
Protocols: []string{"activitypub"},
Metadata: metadata{
ChatEnabled: !data.GetChatDisabled(),
},
}
if err := writeResponse(res, w); err != nil {

View File

@@ -60,7 +60,7 @@ func SendLive() error {
if title := data.GetStreamTitle(); title != "" {
streamTitle = fmt.Sprintf("<p>%s</p>", title)
}
textContent = fmt.Sprintf("<p>%s</p><p>%s</p><p>%s</p><a href=\"%s\">%s</a>", textContent, streamTitle, tagsString, data.GetServerURL(), data.GetServerURL())
textContent = fmt.Sprintf("<p>%s</p>%s<p>%s</p><a href=\"%s\">%s</a>", textContent, streamTitle, tagsString, data.GetServerURL(), data.GetServerURL())
activity, _, note, noteID := createBaseOutboundMessage(textContent)
@@ -76,18 +76,21 @@ func SendLive() error {
previewURL, err := url.Parse(data.GetServerURL())
if err == nil {
var imageToAttach string
var mediaType string
previewGif := filepath.Join(config.WebRoot, "preview.gif")
thumbnailJpg := filepath.Join(config.WebRoot, "thumbnail.jpg")
uniquenessString := shortid.MustGenerate()
if utils.DoesFileExists(previewGif) {
imageToAttach = "preview.gif"
mediaType = "image/gif"
} else if utils.DoesFileExists(thumbnailJpg) {
imageToAttach = "thumbnail.jpg"
mediaType = "image/jpeg"
}
if imageToAttach != "" {
previewURL.Path = imageToAttach
previewURL.RawQuery = "us=" + uniquenessString
apmodels.AddImageAttachmentToNote(note, previewURL.String())
apmodels.AddImageAttachmentToNote(note, previewURL.String(), mediaType)
}
}

View File

@@ -55,7 +55,6 @@ func GetUserByAuth(authToken string, authType Type) *user.User {
Type: string(authType),
})
if err != nil {
log.Errorln(err)
return nil
}

View File

@@ -358,9 +358,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001332",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz",
"integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw=="
"version": "1.0.30001335",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001335.tgz",
"integrity": "sha512-ddP1Tgm7z2iIxu6QTtbZUv6HJxSaV/PZeSrWFZtbY4JZ69tOeNhBCl3HyRQgeNZKE5AOn1kpV7fhljigy0Ty3w=="
},
"chalk": {
"version": "4.1.2",
@@ -653,9 +653,9 @@
}
},
"electron-to-chromium": {
"version": "1.4.118",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz",
"integrity": "sha512-maZIKjnYDvF7Fs35nvVcyr44UcKNwybr93Oba2n3HkKDFAtk0svERkLN/HyczJDS3Fo4wU9th9fUQd09ZLtj1w=="
"version": "1.4.129",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.129.tgz",
"integrity": "sha512-GgtN6bsDtHdtXJtlMYZWGB/uOyjZWjmRDumXTas7dGBaB9zUyCjzHet1DY2KhyHN8R0GLbzZWqm4efeddqqyRQ=="
},
"emoji-regex": {
"version": "8.0.0",
@@ -841,9 +841,9 @@
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"htm": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/htm/-/htm-3.1.0.tgz",
"integrity": "sha512-L0s3Sid5r6YwrEvkig14SK3Emmc+kIjlfLhEGn2Vy3bk21JyDEes4MoDsbJk6luaPp8bugErnxPz86ZuAw6e5Q=="
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz",
"integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ=="
},
"html-tags": {
"version": "3.2.0",
@@ -1076,9 +1076,9 @@
}
},
"node-releases": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.3.tgz",
"integrity": "sha512-maHFz6OLqYxz+VQyCAtA3PTX4UP/53pa05fyDNc9CwjvJ0yEh6+xBwKsgCxMNhS8taUKBFYxfuiaD9U/55iFaw=="
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz",
"integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ=="
},
"normalize-path": {
"version": "3.0.0",

View File

@@ -16,7 +16,6 @@ func InternalErrorHandler(w http.ResponseWriter, err error) {
return
}
w.WriteHeader(http.StatusInternalServerError)
if err := json.NewEncoder(w).Encode(j{"error": err.Error()}); err != nil {
InternalErrorHandler(w, err)
}

View File

@@ -11,4 +11,5 @@ import (
func Ping(w http.ResponseWriter, r *http.Request) {
viewer := models.GenerateViewerFromRequest(r)
core.SetViewerActive(&viewer)
w.WriteHeader(http.StatusOK)
}

View File

@@ -3,6 +3,7 @@ package controllers
import (
"encoding/json"
"net/http"
"time"
"github.com/owncast/owncast/core"
"github.com/owncast/owncast/router/middleware"
@@ -15,6 +16,7 @@ func GetStatus(w http.ResponseWriter, r *http.Request) {
response := webStatusResponse{
Online: status.Online,
ViewerCount: status.ViewerCount,
ServerTime: time.Now(),
LastConnectTime: status.LastConnectTime,
LastDisconnectTime: status.LastDisconnectTime,
VersionNumber: status.VersionNumber,
@@ -30,9 +32,9 @@ func GetStatus(w http.ResponseWriter, r *http.Request) {
}
type webStatusResponse struct {
Online bool `json:"online"`
ViewerCount int `json:"viewerCount"`
Online bool `json:"online"`
ViewerCount int `json:"viewerCount"`
ServerTime time.Time `json:"serverTime"`
LastConnectTime *utils.NullTime `json:"lastConnectTime"`
LastDisconnectTime *utils.NullTime `json:"lastDisconnectTime"`

View File

@@ -46,7 +46,7 @@ func (s *Server) userNameChanged(eventData chatClientEvent) {
log.Errorln("error checking if name is available", err)
return
} else if !available {
message := fmt.Sprintf("You cannot change your name to **%s**, it is already in use.", proposedUsername)
message := fmt.Sprintf("The name **%s** has been already registered. If this is your name, please authenticate.", proposedUsername)
s.sendActionToClient(eventData.client, message)
// Resend the client's user so their username is in sync.

View File

@@ -15,7 +15,7 @@ import (
var _datastore *data.Datastore
const (
maxBacklogHours = 5 // Keep backlog max hours worth of messages
maxBacklogHours = 2 // Keep backlog max hours worth of messages
maxBacklogNumber = 50 // Return max number of messages in history request
)
@@ -289,7 +289,7 @@ func GetChatModerationHistory() []interface{} {
// GetChatHistory will return all the chat messages suitable for returning as user-facing chat history.
func GetChatHistory() []interface{} {
// Get all visible messages
query := fmt.Sprintf("SELECT messages.id,messages.user_id, messages.body, messages.title, messages.subtitle, messages.image, messages.link, messages.eventType, messages.hidden_at, messages.timestamp, users.display_name, users.display_color, users.created_at, users.disabled_at, users.previous_names, users.namechanged_at, users.authenticated_at, users.scopes, users.type FROM messages LEFT JOIN users ON messages.user_id = users.id WHERE hidden_at IS NULL AND disabled_at IS NULL ORDER BY timestamp DESC LIMIT %d", maxBacklogNumber)
query := fmt.Sprintf("SELECT messages.id, messages.user_id, messages.body, messages.title, messages.subtitle, messages.image, messages.link, messages.eventType, messages.hidden_at, messages.timestamp, users.display_name, users.display_color, users.created_at, users.disabled_at, users.previous_names, users.namechanged_at, users.authenticated_at, users.scopes, users.type FROM users JOIN messages ON users.id = messages.user_id WHERE hidden_at IS NULL AND disabled_at IS NULL ORDER BY timestamp DESC LIMIT %d", maxBacklogNumber)
m := getChat(query)
// Invert order of messages
@@ -309,7 +309,7 @@ func SetMessageVisibilityForUserID(userID string, visible bool) error {
// Get a list of IDs to send to the connected clients to hide
ids := make([]string, 0)
query := fmt.Sprintf("SELECT messages.id, user_id, body, title, subtitle, image, link, eventType, hidden_at, timestamp, display_name, display_color, created_at, disabled_at, previous_names, namechanged_at, authenticated, scopes, type FROM messages INNER JOIN users ON messages.user_id = users.id WHERE user_id IS '%s'", userID)
query := fmt.Sprintf("SELECT messages.id, user_id, body, title, subtitle, image, link, eventType, hidden_at, timestamp, display_name, display_color, created_at, disabled_at, previous_names, namechanged_at, authenticated_at, scopes, type FROM messages INNER JOIN users ON messages.user_id = users.id WHERE user_id IS '%s'", userID)
messages := getChat(query)
if len(messages) == 0 {

View File

@@ -24,6 +24,8 @@ func hasPopulatedFederationDefaults() bool {
// PopulateDefaults will set default values in the database.
func PopulateDefaults() {
_datastore.warmCache()
defaults := config.GetDefaults()
if HasPopulatedDefaults() {
@@ -48,6 +50,5 @@ func PopulateDefaults() {
},
})
_datastore.warmCache()
_ = _datastore.SetBool("HAS_POPULATED_DEFAULTS", true)
}

View File

@@ -67,6 +67,7 @@ func (ds *Datastore) Get(key string) (ConfigEntry, error) {
Key: resultKey,
Value: resultValue,
}
ds.SetCachedValue(resultKey, resultValue)
return result, nil
}
@@ -117,7 +118,7 @@ func (ds *Datastore) Setup() {
"key" string NOT NULL PRIMARY KEY,
"value" BLOB,
"timestamp" DATE DEFAULT CURRENT_TIMESTAMP NOT NULL
);`
);CREATE INDEX IF NOT EXISTS messages_timestamp_index ON messages(timestamp);`
stmt, err := ds.DB.Prepare(createTableSQL)
if err != nil {

View File

@@ -30,7 +30,7 @@ func generateStreamHealthOverview() {
}
pct := getClientErrorHeathyPercentage()
if pct == -1 {
if pct < 1 {
metrics.streamHealthOverview = nil
return
}
@@ -145,14 +145,47 @@ func wastefulBitrateOverviewMessage() string {
return ""
}
if currentBroadcaster.StreamDetails.AudioBitrate == 0 {
if currentBroadcaster.StreamDetails.VideoBitrate == 0 {
return ""
}
// Not all streams report their inbound bitrate.
inboundBitrate := currentBroadcaster.StreamDetails.VideoBitrate
maxBitrate := 0
if inboundBitrate == 0 {
return ""
}
outputVariants := data.GetStreamOutputVariants()
type singleVariant struct {
isVideoPassthrough bool
bitrate int
}
streamSortVariants := make([]singleVariant, len(outputVariants))
for i, variant := range outputVariants {
variantSort := singleVariant{
bitrate: variant.VideoBitrate,
isVideoPassthrough: variant.IsVideoPassthrough,
}
streamSortVariants[i] = variantSort
}
sort.Slice(streamSortVariants, func(i, j int) bool {
if streamSortVariants[i].isVideoPassthrough && !streamSortVariants[j].isVideoPassthrough {
return true
}
if !streamSortVariants[i].isVideoPassthrough && streamSortVariants[j].isVideoPassthrough {
return false
}
return streamSortVariants[i].bitrate > streamSortVariants[j].bitrate
})
maxBitrate := streamSortVariants[0].bitrate
if inboundBitrate > maxBitrate {
return fmt.Sprintf("You're broadcasting to Owncast at %dkbps but only sending to your viewers at %dkbps, requiring unnecessary work to be performed. You may want to decrease what you're sending to Owncast or increase what you send to your viewers to match.", inboundBitrate, maxBitrate)
return fmt.Sprintf("You're streaming to Owncast at %dkbps but only broadcasting to your viewers at %dkbps, requiring unnecessary work to be performed and possible excessive CPU use. You may want to decrease what you're sending to Owncast or increase what you send to your viewers so the highest bitrate matches.", inboundBitrate, maxBitrate)
}
return ""

View File

@@ -9,9 +9,6 @@ import (
// SetHeaders will set our global headers for web resources.
func SetHeaders(w http.ResponseWriter) {
// Tell Google to not use this response in their FLoC tracking.
w.Header().Set("Permissions-Policy", "interest-cohort=()")
// When running automated browser tests we must allow `unsafe-eval` in our CSP
// so we can explicitly add it only when needed.
inTest := os.Getenv("BROWSER_TEST") == "true"

View File

@@ -355,7 +355,7 @@ func Start() error {
// Start auth flow
http.HandleFunc("/api/auth/indieauth", middleware.RequireUserAccessToken(indieauth.StartAuthFlow))
http.HandleFunc("/api/auth/indieauth/callback", indieauth.HandleRedirect)
http.HandleFunc("/api/auth/indieauth/callback", middleware.RequireAdminAuth(indieauth.HandleRedirect))
http.HandleFunc("/api/auth/provider/indieauth", indieauth.HandleAuthEndpoint)
http.HandleFunc("/api/auth/fediverse", middleware.RequireUserAccessToken(fediverseauth.RegisterFediverseOTPRequest))

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,f,n,o,d,h,g,b,u,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,a,e,t,i,f,h,"static/chunks/494-3a553425a2e08b72.js","static/chunks/pages/index-279c3b5bf5851b91.js"],"/_error":["static/chunks/pages/_error-a3f18418a2205cb8.js"],"/access-tokens":[s,c,a,"static/chunks/pages/access-tokens-26d25d8e8c57e652.js"],"/actions":[s,c,"static/chunks/pages/actions-7f3fa94d2f41e035.js"],"/chat/messages":[g,s,c,a,f,b,"static/chunks/pages/chat/messages-6a7ab995977931d6.js"],"/chat/users":[g,s,c,a,e,f,b,"static/chunks/pages/chat/users-cf5257ec24785cdc.js"],"/config-chat":["static/chunks/pages/config-chat-44a80bdf9a1566fa.js"],"/config-federation":["static/chunks/829-d13a92a702516b11.js","static/chunks/pages/config-federation-d0dab48ca3b7b38b.js"],"/config-notify":["static/chunks/pages/config-notify-165cbab49012c511.js"],"/config-public-details":[s,c,n,"static/css/e773f9ad06a56dc3.css","static/chunks/589-7e8297b550c0f7b5.js",u,"static/chunks/pages/config-public-details-16b40a5c72065f1b.js"],"/config-server-details":[r,"static/chunks/pages/config-server-details-d218ab74b166afb8.js"],"/config-social-items":[s,c,u,"static/chunks/pages/config-social-items-5666873fcc38f1cf.js"],"/config-storage":["static/chunks/473-4a8f57d947ec1020.js","static/chunks/pages/config-storage-fe1482834ce952f3.js"],"/config-video":[s,c,r,"static/chunks/556-e371537a5b08e653.js","static/chunks/pages/config-video-9420079f55dbb428.js"],"/federation/actions":[s,c,a,"static/chunks/pages/federation/actions-714bb4df4ee77ae4.js"],"/federation/followers":[s,c,a,e,"static/chunks/pages/federation/followers-e6855503a77efca8.js"],"/hardware-info":[o,a,e,t,i,d,n,"static/chunks/pages/hardware-info-1e9fd416152fdddb.js"],"/help":[e,t,"static/chunks/132-b6107d90ed827292.js","static/chunks/pages/help-01384cfc83a0fca8.js"],"/logs":[s,c,a,h,"static/chunks/pages/logs-10ca46602c7a568a.js"],"/stream-health":[o,s,a,e,t,i,d,"static/chunks/pages/stream-health-1ac81fdd5a0562a0.js"],"/upgrade":[s,c,"static/chunks/655-37148fe20945e086.js","static/chunks/pages/upgrade-eead66aad0fb9621.js"],"/viewer-info":[o,s,c,a,e,t,i,f,d,n,"static/chunks/pages/viewer-info-1a05a649223d2250.js"],"/webhooks":[s,c,"static/chunks/pages/webhooks-ba06849b846329a3.js"],sortedPages:["/","/_app","/_error","/access-tokens","/actions","/chat/messages","/chat/users","/config-chat","/config-federation","/config-notify","/config-public-details","/config-server-details","/config-social-items","/config-storage","/config-video","/federation/actions","/federation/followers","/hardware-info","/help","/logs","/stream-health","/upgrade","/viewer-info","/webhooks"]}}("static/chunks/741-ba14afb88fb9f97c.js","static/chunks/3-8af634d45e4c9fbe.js","static/chunks/91-e5a929ca024e0e59.js","static/chunks/879-94c8a074070c0675.js","static/chunks/751-f75aadd6f563115a.js","static/chunks/763-6084d4b3c149b8f4.js","static/chunks/533-2f63c37b8986cca1.js","static/chunks/910-ed07ccf32f311d03.js","static/chunks/36bcf0ca-c1f70baa5cd8cbbf.js","static/chunks/80-979a39dd33b1f687.js","static/chunks/429-a7aa15b93f965750.js","static/chunks/29107295-1494f237b9e407ad.js","static/chunks/464-7e55d24d0b1fd659.js","static/chunks/17-21dcf65b12f3d596.js","static/chunks/578-73510db4cf8c2d92.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();

View File

@@ -0,0 +1 @@
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,n,f,o,d,h,g,u,r,k){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,a,e,t,i,n,h,"static/chunks/2494-8114e9c6571377d1.js","static/chunks/pages/index-e0ac83ceaf99b5f0.js"],"/_error":["static/chunks/pages/_error-785557186902809b.js"],"/access-tokens":[s,c,a,"static/chunks/pages/access-tokens-d328b918d1f9b3d4.js"],"/actions":[s,c,"static/chunks/pages/actions-9278698db4cd1a16.js"],"/chat/messages":[g,s,c,a,n,u,"static/chunks/pages/chat/messages-0df125d8b9455827.js"],"/chat/users":[g,s,c,a,e,n,"static/chunks/6489-cea2e8971ed16ad4.js",u,"static/chunks/pages/chat/users-201d39dd28f27416.js"],"/config-chat":["static/chunks/pages/config-chat-bacb12d23264144b.js"],"/config-federation":["static/chunks/1829-f5c4fb462b2f7e98.js","static/chunks/pages/config-federation-ea0f018fb4193b61.js"],"/config-notify":["static/chunks/pages/config-notify-10a8844dc11ca4b2.js"],"/config-public-details":[s,c,f,"static/css/e773f9ad06a56dc3.css","static/chunks/2589-e1721280387f6322.js",r,"static/chunks/pages/config-public-details-94ff52653eb2586e.js"],"/config-server-details":[k,"static/chunks/pages/config-server-details-cd516688accb84d3.js"],"/config-social-items":[s,c,r,"static/chunks/pages/config-social-items-42e2ed4eed8d4dd2.js"],"/config-storage":["static/chunks/5473-623385148d67cba2.js","static/chunks/pages/config-storage-5ff120c715bfdb04.js"],"/config-video":[s,c,k,"static/chunks/1556-d7a4de19826e46f3.js","static/chunks/pages/config-video-32d86e0ba98dc6fe.js"],"/federation/actions":[s,c,a,"static/chunks/pages/federation/actions-7cfffddef3b58d86.js"],"/federation/followers":[s,c,a,e,"static/chunks/pages/federation/followers-d2d105c342c79f98.js"],"/hardware-info":[o,a,e,t,i,d,f,"static/chunks/pages/hardware-info-4723b20a84e4f461.js"],"/help":[e,t,"static/chunks/6132-187b2bf3e1265f44.js","static/chunks/pages/help-deeb1c0f667c7d75.js"],"/logs":[s,c,a,h,"static/chunks/pages/logs-df4b23b85b8ac818.js"],"/stream-health":[o,s,a,e,t,i,d,"static/chunks/pages/stream-health-5edc91e4fa00ba5c.js"],"/upgrade":[s,c,"static/chunks/9655-6347f487aa1205af.js","static/chunks/pages/upgrade-6cb31f6812e79694.js"],"/viewer-info":[o,s,c,a,e,t,i,n,d,f,"static/chunks/pages/viewer-info-03fcbea265510389.js"],"/webhooks":[s,c,"static/chunks/pages/webhooks-651cb241952e0e4a.js"],sortedPages:["/","/_app","/_error","/access-tokens","/actions","/chat/messages","/chat/users","/config-chat","/config-federation","/config-notify","/config-public-details","/config-server-details","/config-social-items","/config-storage","/config-video","/federation/actions","/federation/followers","/hardware-info","/help","/logs","/stream-health","/upgrade","/viewer-info","/webhooks"]}}("static/chunks/1741-d9d648ade4ad86b9.js","static/chunks/6003-f37682e25271f05f.js","static/chunks/8091-5bc21baa6d0d3232.js","static/chunks/8879-af8bf87fdc518c08.js","static/chunks/7751-48959ec0f11e9080.js","static/chunks/4763-7fd93797a527a971.js","static/chunks/5533-096cc7dc6703128f.js","static/chunks/7910-699eb8ed3467dc00.js","static/chunks/36bcf0ca-110fd889741d5f41.js","static/chunks/1080-1a127ea7f5a8eb3d.js","static/chunks/2429-ccb4d7fa1648dd38.js","static/chunks/29107295-4a69275373f23f88.js","static/chunks/1371-f41477e42ee50603.js","static/chunks/1017-0760c7f39ffcc2a7.js","static/chunks/4578-afc9eff4fbf5ecb1.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();

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

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 +0,0 @@
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[533],{85533:function(t,r,e){e.d(r,{Z:function(){return d}});var n=e(19013),a=e(13882);function o(t,r){(0,a.Z)(2,arguments);var e=(0,n.Z)(t),o=(0,n.Z)(r),s=e.getTime()-o.getTime();return s<0?-1:s>0?1:s}function s(t,r){(0,a.Z)(2,arguments);var e=(0,n.Z)(t),o=(0,n.Z)(r),s=e.getFullYear()-o.getFullYear(),u=e.getMonth()-o.getMonth();return 12*s+u}function u(t){(0,a.Z)(1,arguments);var r=(0,n.Z)(t);return r.setHours(23,59,59,999),r}function i(t){(0,a.Z)(1,arguments);var r=(0,n.Z)(t),e=r.getMonth();return r.setFullYear(r.getFullYear(),e+1,0),r.setHours(23,59,59,999),r}function f(t){(0,a.Z)(1,arguments);var r=(0,n.Z)(t);return u(r).getTime()===i(r).getTime()}function c(t,r){(0,a.Z)(2,arguments);var e,u=(0,n.Z)(t),i=(0,n.Z)(r),c=o(u,i),l=Math.abs(s(u,i));if(l<1)e=0;else{1===u.getMonth()&&u.getDate()>27&&u.setDate(30),u.setMonth(u.getMonth()-c*l);var h=o(u,i)===-c;f((0,n.Z)(t))&&1===l&&1===o(t,i)&&(h=!1),e=c*(l-Number(h))}return 0===e?0:e}var l=e(40364),h=e(35077);function m(t){return function(t,r){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in r=r||{})Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t}({},t)}var Z=e(24262),D=1440,v=43200;function M(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,a.Z)(2,arguments);var s=e.locale||h.Z;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var u=o(t,r);if(isNaN(u))throw new RangeError("Invalid time value");var i,f,M=m(e);M.addSuffix=Boolean(e.addSuffix),M.comparison=u,u>0?(i=(0,n.Z)(r),f=(0,n.Z)(t)):(i=(0,n.Z)(t),f=(0,n.Z)(r));var d,g=(0,l.Z)(f,i),p=((0,Z.Z)(f)-(0,Z.Z)(i))/1e3,X=Math.round((g-p)/60);if(X<2)return e.includeSeconds?g<5?s.formatDistance("lessThanXSeconds",5,M):g<10?s.formatDistance("lessThanXSeconds",10,M):g<20?s.formatDistance("lessThanXSeconds",20,M):g<40?s.formatDistance("halfAMinute",null,M):g<60?s.formatDistance("lessThanXMinutes",1,M):s.formatDistance("xMinutes",1,M):0===X?s.formatDistance("lessThanXMinutes",1,M):s.formatDistance("xMinutes",X,M);if(X<45)return s.formatDistance("xMinutes",X,M);if(X<90)return s.formatDistance("aboutXHours",1,M);if(X<D){var b=Math.round(X/60);return s.formatDistance("aboutXHours",b,M)}if(X<2520)return s.formatDistance("xDays",1,M);if(X<v){var w=Math.round(X/D);return s.formatDistance("xDays",w,M)}if(X<86400)return d=Math.round(X/v),s.formatDistance("aboutXMonths",d,M);if((d=c(f,i))<12){var T=Math.round(X/v);return s.formatDistance("xMonths",T,M)}var x=d%12,Y=Math.floor(d/12);return x<3?s.formatDistance("aboutXYears",Y,M):x<9?s.formatDistance("overXYears",Y,M):s.formatDistance("almostXYears",Y+1,M)}function d(t,r){return(0,a.Z)(1,arguments),M(t,Date.now(),r)}}}]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5533],{85533:function(t,r,e){e.d(r,{Z:function(){return d}});var n=e(19013),a=e(13882);function o(t,r){(0,a.Z)(2,arguments);var e=(0,n.Z)(t),o=(0,n.Z)(r),s=e.getTime()-o.getTime();return s<0?-1:s>0?1:s}function s(t,r){(0,a.Z)(2,arguments);var e=(0,n.Z)(t),o=(0,n.Z)(r),s=e.getFullYear()-o.getFullYear(),u=e.getMonth()-o.getMonth();return 12*s+u}function u(t){(0,a.Z)(1,arguments);var r=(0,n.Z)(t);return r.setHours(23,59,59,999),r}function i(t){(0,a.Z)(1,arguments);var r=(0,n.Z)(t),e=r.getMonth();return r.setFullYear(r.getFullYear(),e+1,0),r.setHours(23,59,59,999),r}function f(t){(0,a.Z)(1,arguments);var r=(0,n.Z)(t);return u(r).getTime()===i(r).getTime()}function c(t,r){(0,a.Z)(2,arguments);var e,u=(0,n.Z)(t),i=(0,n.Z)(r),c=o(u,i),l=Math.abs(s(u,i));if(l<1)e=0;else{1===u.getMonth()&&u.getDate()>27&&u.setDate(30),u.setMonth(u.getMonth()-c*l);var h=o(u,i)===-c;f((0,n.Z)(t))&&1===l&&1===o(t,i)&&(h=!1),e=c*(l-Number(h))}return 0===e?0:e}var l=e(40364),h=e(35077);function m(t){return function(t,r){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in r=r||{})Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t}({},t)}var Z=e(24262),D=1440,v=43200;function M(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,a.Z)(2,arguments);var s=e.locale||h.Z;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var u=o(t,r);if(isNaN(u))throw new RangeError("Invalid time value");var i,f,M=m(e);M.addSuffix=Boolean(e.addSuffix),M.comparison=u,u>0?(i=(0,n.Z)(r),f=(0,n.Z)(t)):(i=(0,n.Z)(t),f=(0,n.Z)(r));var d,g=(0,l.Z)(f,i),p=((0,Z.Z)(f)-(0,Z.Z)(i))/1e3,X=Math.round((g-p)/60);if(X<2)return e.includeSeconds?g<5?s.formatDistance("lessThanXSeconds",5,M):g<10?s.formatDistance("lessThanXSeconds",10,M):g<20?s.formatDistance("lessThanXSeconds",20,M):g<40?s.formatDistance("halfAMinute",null,M):g<60?s.formatDistance("lessThanXMinutes",1,M):s.formatDistance("xMinutes",1,M):0===X?s.formatDistance("lessThanXMinutes",1,M):s.formatDistance("xMinutes",X,M);if(X<45)return s.formatDistance("xMinutes",X,M);if(X<90)return s.formatDistance("aboutXHours",1,M);if(X<D){var b=Math.round(X/60);return s.formatDistance("aboutXHours",b,M)}if(X<2520)return s.formatDistance("xDays",1,M);if(X<v){var w=Math.round(X/D);return s.formatDistance("xDays",w,M)}if(X<86400)return d=Math.round(X/v),s.formatDistance("aboutXMonths",d,M);if((d=c(f,i))<12){var T=Math.round(X/v);return s.formatDistance("xMonths",T,M)}var x=d%12,Y=Math.floor(d/12);return x<3?s.formatDistance("aboutXYears",Y,M):x<9?s.formatDistance("overXYears",Y,M):s.formatDistance("almostXYears",Y+1,M)}function d(t,r){return(0,a.Z)(1,arguments),M(t,Date.now(),r)}}}]);

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

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

@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4820],{14977:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(89185)}])}},function(n){n.O(0,[9774,2888,179],(function(){return _=14977,n(n.s=_);var _}));var _=n.O();_N_E=_}]);

View File

@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{14977:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(89185)}])}},function(n){n.O(0,[774,888,179],(function(){return _=14977,n(n.s=_);var _}));var _=n.O();_N_E=_}]);

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4269],{48689:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var c=t(1413),i=t(67294),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},s=t(42135),u=function(e,n){return i.createElement(s.Z,(0,c.Z)((0,c.Z)({},e),{},{ref:n,icon:r}))};u.displayName="DeleteOutlined";var a=i.forwardRef(u)},23999:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config-social-items",function(){return t(57535)}])},57535:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return u}});var c=t(85893),i=(t(67294),t(84485)),r=t(91017),s=i.Z.Title;function u(){return(0,c.jsxs)("div",{className:"config-social-items",children:[(0,c.jsx)(s,{children:"Social Items"}),(0,c.jsx)(r.Z,{})]})}}},function(e){e.O(0,[1741,6003,1017,9774,2888,179],(function(){return n=23999,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

View File

@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[269],{48689:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var c=t(1413),i=t(67294),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},s=t(42135),u=function(e,n){return i.createElement(s.Z,(0,c.Z)((0,c.Z)({},e),{},{ref:n,icon:r}))};u.displayName="DeleteOutlined";var a=i.forwardRef(u)},23999:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config-social-items",function(){return t(57535)}])},57535:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return u}});var c=t(85893),i=(t(67294),t(84485)),r=t(91017),s=i.Z.Title;function u(){return(0,c.jsxs)("div",{className:"config-social-items",children:[(0,c.jsx)(s,{children:"Social Items"}),(0,c.jsx)(r.Z,{})]})}}},function(e){e.O(0,[741,3,17,774,888,179],(function(){return n=23999,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[332],{6131:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/federation/actions",function(){return n(63646)}])},63646:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var r=n(34051),i=n.n(r),a=n(85893),o=n(67294),s=n(84485),c=n(96003),u=n(58091),l=n(58827),f=n(2766);function d(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}var h=s.Z.Title,p=s.Z.Paragraph;function v(){var e=(0,o.useState)([]),t=e[0],n=e[1],r=(0,o.useState)(0),s=r[0],v=r[1],E=(0,o.useState)(0),w=E[0],m=E[1],_=function(){var e,t=(e=i().mark((function e(){var t,r,a,o,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=50*w,r="".concat(l.op,"?offset=").concat(t,"&limit=").concat(50),e.next=6,(0,l.rQ)(r,{auth:!0});case 6:a=e.sent,o=a.results,s=a.total,v(s),(0,f.Qr)(o)?n([]):n(o),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.log("==== error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})),function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){d(a,r,i,o,s,"next",e)}function s(e){d(a,r,i,o,s,"throw",e)}o(void 0)}))});return function(){return t.apply(this,arguments)}}();(0,o.useEffect)((function(){_()}),[w]);var g,x,y=[{title:"Action",dataIndex:"type",key:"type",width:50,render:function(e,t){var n,r;switch(t.type){case"FEDIVERSE_ENGAGEMENT_REPOST":n="/img/repost.svg",r="Share";break;case"FEDIVERSE_ENGAGEMENT_LIKE":n="/img/like.svg",r="Like";break;case"FEDIVERSE_ENGAGEMENT_FOLLOW":n="/img/follow.svg",r="Follow";break;default:n=""}return(0,a.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:[(0,a.jsx)("img",{src:n,width:"70%",alt:r,title:r}),(0,a.jsx)("div",{style:{fontSize:"0.7rem"},children:r})]})}},{title:"From",dataIndex:"actorIRI",key:"from",render:function(e,t){return(0,a.jsx)("a",{href:t.actorIRI,children:t.actorIRI})}},{title:"When",dataIndex:"timestamp",key:"timestamp",render:function(e,t){var n=new Date(t.timestamp);return(0,u.Z)(n,"P pp")}}];return(0,a.jsxs)("div",{children:[(0,a.jsx)(h,{level:3,children:"Fediverse Actions"}),(0,a.jsx)(p,{children:"Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you."}),(g=t,x=y,(0,a.jsx)(c.Z,{dataSource:g,columns:x,size:"small",rowKey:function(e){return e.iri},pagination:{pageSize:50,hideOnSinglePage:!0,showSizeChanger:!1,total:s},onChange:function(e){var t=e.current;m(t)}}))]})}}},function(e){e.O(0,[741,3,91,774,888,179],(function(){return t=6131,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Some files were not shown because too many files have changed in this diff Show More