Repairing files to bring in line with current release.
This commit is contained in:
1 parent
8eabb7ea31
commit
89f226d50c
27 files changed
+84
-13319
No files matched your search
@@ -1,3 +0,0 @@
|
||||
---
|
||||
ignore:
|
||||
- CVE-2026-85396 # We only use rubyzip for compressing, not extracting
|
||||
@@ -26,7 +26,6 @@
|
||||
stats.html
|
||||
.env
|
||||
.env.production
|
||||
.env.development
|
||||
node_modules/
|
||||
/build/
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
app/javascript/styles/modern/style.scss
|
||||
@@ -8,7 +8,6 @@ module Admin
|
||||
|
||||
layout 'admin'
|
||||
|
||||
before_action :require_moderator_or_admin_permissions
|
||||
before_action :set_referrer_policy_header
|
||||
|
||||
after_action :verify_authorized
|
||||
@@ -22,10 +21,5 @@ module Admin
|
||||
def set_user
|
||||
@user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound)
|
||||
end
|
||||
|
||||
def require_moderator_or_admin_permissions
|
||||
# not using #authorize here, so #verify_authorized still makes sure more fine-grained rules are enforced down the line
|
||||
forbidden unless Admin::BasePolicy.new(current_account, :base).access?
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,21 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Statuses::HistoriesController < Api::BaseController
|
||||
include Authorization
|
||||
|
||||
class Api::V1::Statuses::HistoriesController < Api::V1::Statuses::BaseController
|
||||
before_action -> { authorize_if_got_token! :read, :'read:statuses' }
|
||||
before_action :set_status
|
||||
|
||||
def show
|
||||
render json: @status.edits.includes(:account, status: [:account]), each_serializer: REST::StatusEditSerializer
|
||||
cache_if_unauthenticated!
|
||||
render json: status_edits, each_serializer: REST::StatusEditSerializer
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_status
|
||||
@status = Status.find(params[:status_id])
|
||||
authorize @status, :show?
|
||||
rescue Mastodon::NotPermittedError
|
||||
not_found
|
||||
def status_edits
|
||||
@status.edits.ordered.includes(:account, status: [:account]).to_a.presence || [@status.build_snapshot(at_time: @status.edited_at || @status.created_at)]
|
||||
end
|
||||
end
|
||||
@@ -57,7 +57,7 @@ module StatusesHelper
|
||||
def status_description(status)
|
||||
components = [[media_summary(status), status_text_summary(status)].compact_blank.join(' · ')]
|
||||
|
||||
if status.spoiler_text.blank? || Setting.preview_sensitive_media
|
||||
if status.spoiler_text.blank?
|
||||
components << status.text
|
||||
components << poll_summary(status)
|
||||
end
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 424 KiB |
@@ -1,8 +0,0 @@
|
||||
@import 'wobbl/variables';
|
||||
@import 'application';
|
||||
@import 'modern/modern';
|
||||
|
||||
.layout-multiple-columns .column {
|
||||
flex-grow: 1;
|
||||
max-width: 500px;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
@import 'mastodon/variables';
|
||||
@import 'application';
|
||||
@import 'modern/modern';
|
||||
|
||||
.layout-multiple-columns .column {
|
||||
flex-grow: 1;
|
||||
max-width: 500px;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
@import 'wobbl-light/variables';
|
||||
@import 'application';
|
||||
@import 'modern/modern';
|
||||
@import 'mastodon-light/diff';
|
||||
|
||||
.layout-multiple-columns .column {
|
||||
flex-grow: 1;
|
||||
max-width: 500px;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
@import 'mastodon-light/variables';
|
||||
@import 'application';
|
||||
@import 'modern/modern';
|
||||
@import 'mastodon-light/diff';
|
||||
|
||||
.layout-multiple-columns .column {
|
||||
flex-grow: 1;
|
||||
max-width: 500px;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,4 +0,0 @@
|
||||
@import 'wobbl-light/variables';
|
||||
@import 'application';
|
||||
@import 'mastodon-light/diff';
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
// Dependent colors
|
||||
$black: #000000;
|
||||
$white: #ffffff;
|
||||
|
||||
$classic-base-color: #191919;// Dark Gray
|
||||
$classic-primary-color: #E7E7E7;// Platinum
|
||||
$classic-secondary-color: #FF8680; // Paler red
|
||||
$classic-highlight-color: #850700; // Red highlights
|
||||
|
||||
// Differences
|
||||
$success-green: lighten(#3c754d, 8%);
|
||||
|
||||
$base-overlay-background: $white !default;
|
||||
$valid-value-color: $success-green !default;
|
||||
|
||||
$ui-base-color: $classic-primary-color !default;
|
||||
$ui-base-lighter-color: #b0c0cf;
|
||||
$ui-primary-color: #9bcbed;
|
||||
$ui-secondary-color: $classic-base-color !default;
|
||||
$ui-highlight-color: $classic-highlight-color !default;
|
||||
|
||||
$primary-text-color: $black !default;
|
||||
$darker-text-color: $classic-base-color !default;
|
||||
$highlight-text-color: darken($ui-highlight-color, 8%) !default;
|
||||
$dark-text-color: #444b5d;
|
||||
$action-button-color: #606984;
|
||||
|
||||
$inverted-text-color: $black !default;
|
||||
$lighter-text-color: $classic-base-color !default;
|
||||
$light-text-color: #444b5d;
|
||||
|
||||
// Newly added colors
|
||||
$account-background-color: $white !default;
|
||||
|
||||
// Invert darkened and lightened colors
|
||||
@function darken($color, $amount) {
|
||||
@return hsl(hue($color), saturation($color), lightness($color) + $amount);
|
||||
}
|
||||
|
||||
@function lighten($color, $amount) {
|
||||
@return hsl(hue($color), saturation($color), lightness($color) - $amount);
|
||||
}
|
||||
|
||||
$emojis-requiring-inversion: 'chains';
|
||||
@@ -1,2 +0,0 @@
|
||||
@import 'wobbl/variables';
|
||||
@import 'application';
|
||||
@@ -1,60 +0,0 @@
|
||||
// Commonly used web colors
|
||||
$black: #000000; // Black
|
||||
$white: #ffffff; // White
|
||||
$success-green: #79bd9a !default; // Padua
|
||||
$error-red: #df405a !default; // Cerise
|
||||
$warning-red: #ff5050 !default; // Sunset Orange
|
||||
$gold-star: #ca8f04 !default; // Dark Goldenrod
|
||||
|
||||
$red-bookmark: $warning-red;
|
||||
|
||||
// Values from the classic Mastodon UI
|
||||
$classic-base-color: #191919;// Dark Gray
|
||||
$classic-primary-color: #E7E7E7;// Platinum
|
||||
$classic-secondary-color: #FF8680; // Paler red
|
||||
$classic-highlight-color: #850700; // Red highlights
|
||||
|
||||
// Variables for defaults in UI
|
||||
$base-shadow-color: $black !default;
|
||||
$base-overlay-background: $black !default;
|
||||
$base-border-color: $white !default;
|
||||
$simple-background-color: $white !default;
|
||||
$valid-value-color: $success-green !default;
|
||||
$error-value-color: $error-red !default;
|
||||
|
||||
// Tell UI to use selected colors
|
||||
$ui-base-color: $classic-base-color !default; // Darkest
|
||||
$ui-base-lighter-color: lighten($ui-base-color, 26%) !default; // Lighter darkest
|
||||
$ui-primary-color: $classic-primary-color !default; // Lighter
|
||||
$ui-secondary-color: $classic-secondary-color !default; // Lightest
|
||||
$ui-highlight-color: $classic-highlight-color !default;
|
||||
|
||||
// Variables for texts
|
||||
$primary-text-color: $white !default;
|
||||
$darker-text-color: $ui-primary-color !default;
|
||||
$dark-text-color: $ui-base-lighter-color !default;
|
||||
$secondary-text-color: $ui-secondary-color !default;
|
||||
$highlight-text-color: lighten($ui-highlight-color, 8%) !default;
|
||||
$action-button-color: $ui-base-lighter-color !default;
|
||||
$passive-text-color: $gold-star !default;
|
||||
$active-passive-text-color: $success-green !default;
|
||||
|
||||
// For texts on inverted backgrounds
|
||||
$inverted-text-color: $ui-base-color !default;
|
||||
$lighter-text-color: $ui-base-lighter-color !default;
|
||||
$light-text-color: $ui-primary-color !default;
|
||||
|
||||
// Language codes that uses CJK fonts
|
||||
$cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;
|
||||
|
||||
// Variables for components
|
||||
$media-modal-media-max-width: 100%;
|
||||
|
||||
// put margins on top and bottom of image to avoid the screen covered by image.
|
||||
$media-modal-media-max-height: 80%;
|
||||
|
||||
$no-gap-breakpoint: 1175px;
|
||||
|
||||
$font-sans-serif: 'mastodon-font-sans-serif' !default;
|
||||
$font-display: 'mastodon-font-display' !default;
|
||||
$font-monospace: 'mastodon-font-monospace' !default;
|
||||
@@ -22,10 +22,4 @@ class ApplicationMailer < ActionMailer::Base
|
||||
'X-Auto-Response-Suppress' => 'All'
|
||||
)
|
||||
end
|
||||
|
||||
def set_autoreply_headers!
|
||||
headers['Precedence'] = 'list'
|
||||
headers['X-Auto-Response-Suppress'] = 'All'
|
||||
headers['Auto-Submitted'] = 'auto-generated'
|
||||
end
|
||||
end
|
||||
@@ -7,28 +7,30 @@ class Scheduler::AccountsStatusesCleanupScheduler
|
||||
# This limit is mostly to be nice to the fediverse at large and not
|
||||
# generate too much traffic.
|
||||
# This also helps limiting the running time of the scheduler itself.
|
||||
MAX_BUDGET = 150
|
||||
MAX_BUDGET = 300
|
||||
|
||||
# This is an attempt to spread the load across instances, as various
|
||||
# accounts are likely to have various followers.
|
||||
# This is an attempt to spread the load across remote servers, as
|
||||
# spreading deletions across diverse accounts is likely to spread
|
||||
# the deletion across diverse followers. It also helps each individual
|
||||
# user see some effect sooner.
|
||||
PER_ACCOUNT_BUDGET = 5
|
||||
|
||||
# This is an attempt to limit the workload generated by status removal
|
||||
# jobs to something the particular instance can handle.
|
||||
PER_THREAD_BUDGET = 6
|
||||
# jobs to something the particular server can handle.
|
||||
PER_THREAD_BUDGET = 5
|
||||
|
||||
# Those avoid loading an instance that is already under load
|
||||
MAX_DEFAULT_SIZE = 200
|
||||
MAX_DEFAULT_LATENCY = 5
|
||||
MAX_PUSH_SIZE = 500
|
||||
MAX_PUSH_LATENCY = 10
|
||||
|
||||
# 'pull' queue has lower priority jobs, and it's unlikely that pushing
|
||||
# deletes would cause much issues with this queue if it didn't cause issues
|
||||
# with default and push. Yet, do not enqueue deletes if the instance is
|
||||
# lagging behind too much.
|
||||
MAX_PULL_SIZE = 10_000
|
||||
MAX_PULL_LATENCY = 5.minutes.to_i
|
||||
# These are latency limits on various queues above which a server is
|
||||
# considered to be under load, causing the auto-deletion to be entirely
|
||||
# skipped for that run.
|
||||
LOAD_LATENCY_THRESHOLDS = {
|
||||
default: 5,
|
||||
push: 10,
|
||||
# The `pull` queue has lower priority jobs, and it's unlikely that
|
||||
# pushing deletes would cause much issues with this queue if it didn't
|
||||
# cause issues with `default` and `push`. Yet, do not enqueue deletes
|
||||
# if the instance is lagging behind too much.
|
||||
pull: 5.minutes.to_i,
|
||||
}.freeze
|
||||
|
||||
sidekiq_options retry: 0, lock: :until_executed, lock_ttl: 1.day.to_i
|
||||
|
||||
@@ -36,17 +38,37 @@ class Scheduler::AccountsStatusesCleanupScheduler
|
||||
return if under_load?
|
||||
|
||||
budget = compute_budget
|
||||
first_policy_id = last_processed_id
|
||||
|
||||
# If the budget allows it, we want to consider all accounts with enabled
|
||||
# auto cleanup at least once.
|
||||
#
|
||||
# We start from `first_policy_id` (the last processed id in the previous
|
||||
# run) and process each policy until we loop to `first_policy_id`,
|
||||
# recording into `affected_policies` any policy that caused posts to be
|
||||
# deleted.
|
||||
#
|
||||
# After that, we set `full_iteration` to `false` and continue looping on
|
||||
# policies from `affected_policies`.
|
||||
first_policy_id = last_processed_id || 0
|
||||
first_iteration = true
|
||||
full_iteration = true
|
||||
affected_policies = []
|
||||
|
||||
loop do
|
||||
num_processed_accounts = 0
|
||||
|
||||
scope = AccountStatusesCleanupPolicy.where(enabled: true)
|
||||
scope = scope.where(id: first_policy_id...) if first_policy_id.present?
|
||||
scope = cleanup_policies(first_policy_id, affected_policies, first_iteration, full_iteration)
|
||||
scope.find_each(order: :asc) do |policy|
|
||||
num_deleted = AccountStatusesCleanupService.new.call(policy, [budget, PER_ACCOUNT_BUDGET].min)
|
||||
num_processed_accounts += 1 unless num_deleted.zero?
|
||||
budget -= num_deleted
|
||||
|
||||
unless num_deleted.zero?
|
||||
num_processed_accounts += 1
|
||||
affected_policies << policy.id if full_iteration
|
||||
end
|
||||
|
||||
full_iteration = false if !first_iteration && policy.id >= first_policy_id
|
||||
|
||||
if budget.zero?
|
||||
save_last_processed_id(policy.id)
|
||||
break
|
||||
@@ -55,29 +77,48 @@ class Scheduler::AccountsStatusesCleanupScheduler
|
||||
|
||||
# The idea here is to loop through all policies at least once until the budget is exhausted
|
||||
# and start back after the last processed account otherwise
|
||||
break if budget.zero? || (num_processed_accounts.zero? && first_policy_id.nil?)
|
||||
first_policy_id = nil
|
||||
break if budget.zero? || (num_processed_accounts.zero? && !full_iteration)
|
||||
|
||||
full_iteration = false unless first_iteration
|
||||
first_iteration = false
|
||||
end
|
||||
end
|
||||
|
||||
def compute_budget
|
||||
threads = Sidekiq::ProcessSet.new.select { |x| x['queues'].include?('push') }.map { |x| x['concurrency'] }.sum
|
||||
# Each post deletion is a `RemovalWorker` job (on `default` queue), each
|
||||
# potentially spawning many `ActivityPub::DeliveryWorker` jobs (on the `push` queue).
|
||||
threads = Sidekiq::ProcessSet.new.select { |x| x['queues'].include?('push') }.pluck('concurrency').sum
|
||||
[PER_THREAD_BUDGET * threads, MAX_BUDGET].min
|
||||
end
|
||||
|
||||
def under_load?
|
||||
queue_under_load?('default', MAX_DEFAULT_SIZE, MAX_DEFAULT_LATENCY) || queue_under_load?('push', MAX_PUSH_SIZE, MAX_PUSH_LATENCY) || queue_under_load?('pull', MAX_PULL_SIZE, MAX_PULL_LATENCY)
|
||||
LOAD_LATENCY_THRESHOLDS.any? { |queue, max_latency| queue_under_load?(queue, max_latency) }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def queue_under_load?(name, max_size, max_latency)
|
||||
queue = Sidekiq::Queue.new(name)
|
||||
queue.size > max_size || queue.latency > max_latency
|
||||
def cleanup_policies(first_policy_id, affected_policies, first_iteration, full_iteration)
|
||||
scope = AccountStatusesCleanupPolicy.where(enabled: true)
|
||||
|
||||
if full_iteration
|
||||
# If we are doing a full iteration, examine all policies we have not examined yet
|
||||
if first_iteration
|
||||
scope.where(id: first_policy_id...)
|
||||
else
|
||||
scope.where(id: ..first_policy_id).or(scope.where(id: affected_policies))
|
||||
end
|
||||
else
|
||||
# Otherwise, examine only policies that previously yielded posts to delete
|
||||
scope.where(id: affected_policies)
|
||||
end
|
||||
end
|
||||
|
||||
def queue_under_load?(name, max_latency)
|
||||
Sidekiq::Queue.new(name).latency > max_latency
|
||||
end
|
||||
|
||||
def last_processed_id
|
||||
redis.get('account_statuses_cleanup_scheduler:last_policy_id')
|
||||
redis.get('account_statuses_cleanup_scheduler:last_policy_id')&.to_i
|
||||
end
|
||||
|
||||
def save_last_processed_id(id)
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
class Scheduler::IndexingScheduler
|
||||
include Sidekiq::Worker
|
||||
include Redisable
|
||||
include DatabaseHelper
|
||||
|
||||
sidekiq_options retry: 0
|
||||
sidekiq_options retry: 0, lock: :until_executed, lock_ttl: 30.minutes.to_i
|
||||
|
||||
IMPORT_BATCH_SIZE = 1000
|
||||
SCAN_BATCH_SIZE = 10 * IMPORT_BATCH_SIZE
|
||||
@@ -14,13 +15,10 @@ class Scheduler::IndexingScheduler
|
||||
|
||||
indexes.each do |type|
|
||||
with_redis do |redis|
|
||||
redis.sscan_each("chewy:queue:#{type.name}", count: SCAN_BATCH_SIZE) do |ids|
|
||||
redis.pipelined do
|
||||
ids.each_slice(IMPORT_BATCH_SIZE) do |slice_ids|
|
||||
type.import!(slice_ids)
|
||||
redis.srem("chewy:queue:#{type.name}", slice_ids)
|
||||
end
|
||||
end
|
||||
redis.sscan_each("chewy:queue:#{type.name}", count: SCAN_BATCH_SIZE).each_slice(IMPORT_BATCH_SIZE) do |ids|
|
||||
type.import!(ids)
|
||||
|
||||
redis.srem("chewy:queue:#{type.name}", ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -29,6 +27,6 @@ class Scheduler::IndexingScheduler
|
||||
private
|
||||
|
||||
def indexes
|
||||
[AccountsIndex, TagsIndex, StatusesIndex]
|
||||
[AccountsIndex, TagsIndex, PublicStatusesIndex, StatusesIndex]
|
||||
end
|
||||
end
|
||||
@@ -1,129 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11" />
|
||||
<meta name="msapplication-TileImage" content="resources/images/icon_tile.png?v=4398" />
|
||||
<meta name="application-name" content="GYRO-NAS" />
|
||||
<meta name="msapplication-TileColor" content="#246BB3"/>
|
||||
<meta name="description" content="Synology NAS provides a full-featured network attached storage (NAS) solution to help you manage, backup and share data among Windows, Mac and Linux easily." />
|
||||
<meta name="keywords" content="Multitasking,Web Application,Personal Cloud" />
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
|
||||
|
||||
<link rel="mask-icon" href="webman/safari_pin_icon.svg" color="#0086E5" />
|
||||
<link rel="shortcut icon" href="webman/favicon.ico?v=40438" />
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_96.png?v=40438" sizes="96x96"/>
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_64.png?v=40438" sizes="64x64"/>
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_48.png?v=40438" sizes="48x48"/>
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_32.png?v=40438" sizes="32x32"/>
|
||||
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_16.png?v=40438" sizes="16x16"/>
|
||||
<title>GYRO-NAS</title>
|
||||
<link rel="stylesheet" type="text/css" href="scripts/ext-3.4/resources/css/ext-all.css?v=1672898121" />
|
||||
<link rel="stylesheet" type="text/css" href="scripts/scrollbar/flexcroll.css?v=1672898121" />
|
||||
<link rel="stylesheet" type="text/css" href="scripts/ext-3/ux/ux-all.css?v=1672898121" />
|
||||
<link rel="stylesheet" type="text/css" href="synoSDSjslib/sds.css?v=1683108982" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/desktop/dist/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/sds/dist/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/taskbar/dist/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/resources/css/desktop.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/login/dist/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/TinyMCE/style.css?v=1664290641" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ClipBoardJS/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/Utils/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/Widgets/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/BandwidthControl/style.css?v=1634102886" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/DiskMessageHandler/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/UpdateMaskApp/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/HelpBrowser/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/SharingManager/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ResourceMonitor/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/MyDSCenter/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/AudioPlayer/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/Share/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ResetAdminApp/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/DesktopProgress/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/PersonalSettings/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/WelcomeApp/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/BackgroundTaskMonitor/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/HotkeyManager/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/LogCenter/style.css?v=1683102860" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/AdminCenter/style.css?v=1684221484" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/C3/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/VideoPlayer2/style.css?v=1672294400" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/FileChooser/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/EnableNewUpdateSetting/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ConfigBackup/style.css?v=1681465681" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/PhotoViewer/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/DSMNotify/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/SystemInfoApp/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/SupportForm/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/TaskSchedulerUtils/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/TaskSchedulerWidget/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/StorageManager/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/PkgManApp/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/OTPWizard/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/SecurityScan/style.css?v=1673258467" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/PollingTask/style.css?v=1683795523" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/ExternalDevices/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/modules/DataDrivenDocuments/style.css?v=1683699872" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/ScsiTarget/style.css?v=1682669852" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/MediaServer/style.css?v=1678790334" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/DownloadStation/style.css?v=1678963497" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyApplicationService/style.css?v=1680860414" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SupportService/style.css?v=1684410294" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynoFinder/style.css?v=1679717023" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/HyperBackup/style.css?v=1681269975" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/FileTaskMonitor/style.css?v=1688118145" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/ActiveInsight/style.css?v=1686219681" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyDrive-ShareSync/style.css?v=1684478206" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/CodecPack/style.css?v=1678789109" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/AudioStation/style.css?v=1678958732" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyDrive/style.css?v=1684478211" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/VPNCenter/style.css?v=1678785883" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/AntiVirus/style.css?v=1681806841" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/VideoStation/style.css?v=1682651714" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/LogCenter/style.css?v=1684289330" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyPhotos/style.css?v=1685941114" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/CloudSync/style.css?v=1686280500" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/DhcpServer/style.css?v=1681815017" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynologyDrive-Drive/style.css?v=1684478206" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/FileBrowser/style.css?v=1688118153" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SMBService/style.css?v=1688543926" />
|
||||
<link rel="stylesheet" type="text/css" href="webman/3rdparty/OAuthService/style.css?v=1678783966" />
|
||||
<link rel="stylesheet" type="text/css" href="sharing/style.css?v=1669770591" />
|
||||
<link rel="stylesheet" type="text/css" href="../scripts/ext-3.4/resources/css/ext-all.css?v=1690892764" />
|
||||
<link rel="stylesheet" type="text/css" href="../webman/3rdparty/FileBrowser/style.css?v=1690892764" />
|
||||
<link rel="stylesheet" type="text/css" href="../webman/3rdparty/FileBrowser/custom_template.css?v=1690892764" />
|
||||
|
||||
</head>
|
||||
<body role="application">
|
||||
<div id="sds-wallpaper"></div>
|
||||
<!-- Don't contain any text node to avoid IE insertBefore bug -->
|
||||
<div id="sds-login-dialog-form" style="position: absolute; top: -10000px; left: -10000px;"><form id="login-form" class="x-plain-body" method="POST" action="webman/login.cgi" target="login_iframe"><input type="text" class="x-form-text" id="login_username" name="username" maxlength="256" /><input type="password" class="x-form-text" id="login_passwd" name="passwd" maxlength="256" autocomplete="off" /><input class="x-form-text" type="text" id="login_otp" name="OTPcode" maxlength="8" autocomplete="off" /><input type="submit" id="login_submit" style="position: absolute; top: -10000px; left: -10000px;" tabindex="-1" /></form><iframe id="login_iframe" name="login_iframe" width="0" height="0" frameborder="0" style="display: none;"></iframe></div>
|
||||
<div id="sds-apply-preview-form" style="position: absolute; top: -10000px; left: -10000px;"><form id="preview-form" class="x-plain-body" method="POST" action="webman/modules/ControlPanel/modules/dsm.cgi" target="preview_iframe"><input type="submit" id="preview_submit" style="position: absolute; top: -10000px; left: -10000px;" tabindex="-1" /></form><iframe id="preview_iframe" name="preview_iframe" width="0" height="0" frameborder="0" style="display: none;"></iframe></div>
|
||||
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.Defs&version=1&method=getjs&v=1685730685"></script>
|
||||
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.JSUIString&version=1&method=getjs&lang=enu&v=1688388798"></script>
|
||||
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.UIString&version=1&method=getjs&lang=enu&v=1688388802"></script>
|
||||
<script type="text/javascript" src="scripts/babel-polyfill/polyfill.js?v=1672898121"></script>
|
||||
<script type="text/javascript" src="scripts/synowebapi.js/synowebapi.min.js?v=1675322301"></script>
|
||||
<script type="text/javascript" src="scripts/synocredential.js/synocredential.min.js?v=1680089528"></script>
|
||||
<script type="text/javascript" src="scripts/vue/vue.min.js?v=1664290694"></script>
|
||||
<script type="text/javascript" src="scripts/vuex/vuex.min.js?v=1664290698"></script>
|
||||
<script type="text/javascript" src="scripts/vue-router/vue-router.min.js?v=1667901351"></script>
|
||||
<script type="text/javascript" src="scripts/syno-vue-components/syno-vue-components.min.js?v=1684234437"></script>
|
||||
<script type="text/javascript" src="synoSDSjslib/dist/vendor.bundle.js?v=1683108982"></script>
|
||||
<script type="text/javascript" src="synoSDSjslib/dist/sds.bundle.js?v=1683108982"></script>
|
||||
<script type="text/javascript" src="webman/sds/dist/dsm.common.bundle.js?v=1683699872"></script>
|
||||
<script type="text/javascript" src="sharing/sharing-sds.js?v=1683699872"></script>
|
||||
<script type="text/javascript" src="sharing/sharing.js?v=1669770591"></script>
|
||||
<script type="text/javascript" src="../scripts/ext-3.4/adapter/ext/ext-base.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="../scripts/ext-3.4/ext-all.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="../scripts/ext-3.4/ux/ux-all.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="../webman/sds/dist/dsm.common.bundle.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="../wfmlogindialog.js?v=1690892764"></script>
|
||||
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Sharing.Session&version=1&method=get&sharing_id="2VsGPnJVW"&sharing_status="none"&v=1683603442"></script>
|
||||
|
||||
<div id="main"></div>
|
||||
<div class="pre-load-x-window-br"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,8 +8,6 @@ Rails.application.configure do
|
||||
# Make code changes take effect immediately without server restart.
|
||||
config.enable_reloading = true
|
||||
|
||||
config.hosts << 'wobbldev.tarrien.net'
|
||||
|
||||
# Do not eager load code on boot.
|
||||
config.eager_load = false
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ threads min_threads_count, max_threads_count
|
||||
if ENV['SOCKET']
|
||||
bind "unix://#{ENV['SOCKET']}"
|
||||
else
|
||||
bind "tcp://#{ENV.fetch('BIND', '0.0.0.0')}:#{ENV.fetch('PORT', 3000)}"
|
||||
bind "tcp://#{ENV.fetch('BIND', '127.0.0.1')}:#{ENV.fetch('PORT', 3000)}"
|
||||
end
|
||||
|
||||
workers ENV.fetch('WEB_CONCURRENCY') { 2 }.to_i
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
const { environment } = require('@rails/webpacker')
|
||||
|
||||
module.exports = environment
|
||||
@@ -1,5 +0,0 @@
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
||||
|
||||
const environment = require('./environment')
|
||||
|
||||
module.exports = environment.toWebpackConfig()
|
||||
@@ -1,74 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::ConversationsController do
|
||||
render_views
|
||||
|
||||
let!(:user) { Fabricate(:user, account_attributes: { username: 'alice' }) }
|
||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
||||
let(:other) { Fabricate(:user) }
|
||||
|
||||
before do
|
||||
allow(controller).to receive(:doorkeeper_token) { token }
|
||||
end
|
||||
|
||||
describe 'GET #index', :sidekiq_inline do
|
||||
let(:scopes) { 'read:statuses' }
|
||||
|
||||
before do
|
||||
PostStatusService.new.call(other.account, text: 'Hey @alice', visibility: 'direct')
|
||||
PostStatusService.new.call(user.account, text: 'Hey, nobody here', visibility: 'direct')
|
||||
end
|
||||
|
||||
it 'returns pagination headers', :aggregate_failures do
|
||||
get :index, params: { limit: 1 }
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response.headers['Link'].links.size).to eq(2)
|
||||
end
|
||||
|
||||
it 'returns conversations', :aggregate_failures do
|
||||
get :index
|
||||
json = body_as_json
|
||||
expect(json.size).to eq 2
|
||||
expect(json[0][:accounts].size).to eq 1
|
||||
end
|
||||
|
||||
context 'with since_id' do
|
||||
context 'when requesting old posts' do
|
||||
it 'returns conversations' do
|
||||
get :index, params: { since_id: Mastodon::Snowflake.id_at(1.hour.ago, with_random: false) }
|
||||
json = body_as_json
|
||||
expect(json.size).to eq 2
|
||||
end
|
||||
end
|
||||
|
||||
context 'when requesting posts in the future' do
|
||||
it 'returns no conversation' do
|
||||
get :index, params: { since_id: Mastodon::Snowflake.id_at(1.hour.from_now, with_random: false) }
|
||||
json = body_as_json
|
||||
expect(json.size).to eq 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with since_id' do
|
||||
context 'when requesting old posts' do
|
||||
it 'returns conversations' do
|
||||
get :index, params: { since_id: Mastodon::Snowflake.id_at(1.hour.ago, with_random: false) }
|
||||
json = body_as_json
|
||||
expect(json.size).to eq 1
|
||||
end
|
||||
end
|
||||
|
||||
context 'when requesting posts in the future' do
|
||||
it 'returns no conversation' do
|
||||
get :index, params: { since_id: Mastodon::Snowflake.id_at(1.hour.from_now, with_random: false) }
|
||||
json = body_as_json
|
||||
expect(json.size).to eq 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -111,13 +111,5 @@ RSpec.describe 'API V2 Admin Accounts' do
|
||||
.to start_with('application/json')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with limit param' do
|
||||
let(:params) { { limit: 1 } }
|
||||
|
||||
it 'sets the correct pagination headers' do
|
||||
expect(response.headers['Link'].find_link(%w(rel next)).href).to eq api_v2_admin_accounts_url(limit: 1, max_id: admin_account.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-8247
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user