Merge pull request #3584 from glitch-soc/glitch-soc/merge-upstream
Merge upstream changes up to 9edbe4706a
This commit is contained in:
39 files changed
+550
-106
No files matched your search
@@ -233,7 +233,7 @@ module JsonLdHelper
|
||||
# If an error is raised, it contains the response and can be captured for handling like
|
||||
#
|
||||
# begin
|
||||
# fetch_resource_without_id_validation(uri, nil, true)
|
||||
# fetch_resource_without_id_validation(uri, raise_on_error: :all)
|
||||
# rescue Mastodon::UnexpectedResponseError => e
|
||||
# e.response
|
||||
# end
|
||||
|
||||
@@ -55,6 +55,7 @@ export const ThemePlayground: React.FC = () => {
|
||||
</aside>
|
||||
</nav>
|
||||
<main>Test 1 2 3</main>
|
||||
<div className={classes.overlay}>Hello World</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
+44
-23
@@ -1,11 +1,13 @@
|
||||
@use '@/styles/mastodon/mixins';
|
||||
|
||||
.wrapper {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 250px 1fr;
|
||||
gap: 1rem;
|
||||
padding: 2rem;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
gap: var(--space-md);
|
||||
padding: var(--space-3xl);
|
||||
font-size: var(--fs-lg);
|
||||
line-height: var(--lh-normal);
|
||||
overflow-wrap: break-word;
|
||||
color: var(--color-text-primary);
|
||||
background-color: var(--color-bg-blend);
|
||||
@@ -17,18 +19,19 @@
|
||||
nav {
|
||||
display: block;
|
||||
grid-template-rows: min-content;
|
||||
font-size: 14px;
|
||||
font-size: var(--fs-sm);
|
||||
|
||||
input {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
margin-block-end: 1rem;
|
||||
padding: 0.5rem 1rem;
|
||||
margin-block-end: var(--space-md);
|
||||
padding: var(--space-xs) var(--space-md);
|
||||
color: var(--color-text-primary);
|
||||
background: transparent;
|
||||
border: 1px solid var(--color-border-primary);
|
||||
border-radius: 0.5rem;
|
||||
border-radius: var(--radius-xs);
|
||||
font: inherit;
|
||||
|
||||
&:focus {
|
||||
border-color: var(--color-border-brand);
|
||||
@@ -38,9 +41,10 @@
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 0.5rem 1rem 0.45rem;
|
||||
border-radius: 0.5rem;
|
||||
padding: var(--space-xs) var(--space-md);
|
||||
border-radius: var(--radius-xs);
|
||||
color: var(--color-text-secondary);
|
||||
@include mixins.type-body-compact;
|
||||
|
||||
&[aria-current='page'] {
|
||||
color: var(--color-text-primary);
|
||||
@@ -55,22 +59,23 @@
|
||||
'subtitle button';
|
||||
grid-template-columns: 1fr min-content;
|
||||
align-items: center;
|
||||
gap: 0.125rem 0.5rem;
|
||||
margin-block-start: 1rem;
|
||||
padding: 0.75rem 1rem;
|
||||
line-height: 1.2;
|
||||
border-radius: 1rem;
|
||||
background-color: var(--color-bg-highlight);
|
||||
gap: var(--space-3xs) var(--space-xs);
|
||||
margin-block-start: var(--space-md);
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--color-border-primary);
|
||||
|
||||
h2 {
|
||||
grid-area: title;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
@include mixins.type-body;
|
||||
|
||||
line-height: var(--lh-tighter);
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
grid-area: subtitle;
|
||||
font-size: 12px;
|
||||
@include mixins.type-label-sm;
|
||||
|
||||
color: var(--color-text-secondary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -84,15 +89,31 @@
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: none;
|
||||
background-color: var(--color-bg-highlight);
|
||||
border-radius: 99rem;
|
||||
background-color: transparent;
|
||||
border-radius: var(--radius-round);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-bg-highlight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
padding: var(--space-3xl);
|
||||
background-color: var(--color-bg-primary);
|
||||
border-radius: 1rem;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
inset: auto var(--space-md) var(--space-md) auto;
|
||||
width: 30%;
|
||||
height: 35%;
|
||||
padding: var(--space-md);
|
||||
background-color: var(--color-bg-primary);
|
||||
border-radius: var(--radius-xl);
|
||||
|
||||
@include mixins.elevation-2;
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -61,18 +61,18 @@ export const NotificationFollowRequest: React.FC<{
|
||||
|
||||
const actions = (
|
||||
<>
|
||||
<IconButton
|
||||
title={intl.formatMessage(messages.reject)}
|
||||
icon='times'
|
||||
iconComponent={CloseIcon}
|
||||
onClick={onReject}
|
||||
/>
|
||||
<IconButton
|
||||
title={intl.formatMessage(messages.authorize)}
|
||||
icon='check'
|
||||
iconComponent={CheckIcon}
|
||||
onClick={onAuthorize}
|
||||
/>
|
||||
<IconButton
|
||||
title={intl.formatMessage(messages.reject)}
|
||||
icon='times'
|
||||
iconComponent={CloseIcon}
|
||||
onClick={onReject}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@use '@/styles/fonts/roboto-mono';
|
||||
|
||||
@use 'mastodon/reset';
|
||||
@use 'mastodon/theme';
|
||||
@use 'mastodon/tokens';
|
||||
@use 'mastodon/basics';
|
||||
@use 'mastodon/branding';
|
||||
@use 'mastodon/containers';
|
||||
|
||||
@@ -1,14 +1,113 @@
|
||||
// glitch-soc addition
|
||||
@mixin fullwidth-gallery {
|
||||
&.full-width {
|
||||
margin-left: -14px;
|
||||
margin-right: -14px;
|
||||
width: inherit;
|
||||
max-width: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
/**
|
||||
* Type styles
|
||||
*/
|
||||
|
||||
@mixin type-heading-lg {
|
||||
// font-family: Syne;
|
||||
font-size: var(--fs-3xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-tighter);
|
||||
}
|
||||
|
||||
@mixin type-heading-md {
|
||||
// font-family: Syne;
|
||||
font-size: var(--fs-2xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-tight);
|
||||
}
|
||||
|
||||
@mixin type-heading-sm {
|
||||
// font-family: Syne;
|
||||
font-size: var(--fs-xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tight);
|
||||
letter-spacing: var(--ls-tight);
|
||||
}
|
||||
|
||||
@mixin type-body-lg {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-lg);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-normal);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-body-strong {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-normal);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-body {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-normal);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-body-compact {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tight);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-label-lg {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tight);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-label-md {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-loose);
|
||||
}
|
||||
|
||||
@mixin type-label-sm {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-2xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-loose);
|
||||
}
|
||||
|
||||
@mixin type-micro {
|
||||
// font-family: 'JetBrains Mono';
|
||||
font-size: var(--fs-3xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-looser);
|
||||
}
|
||||
|
||||
/**
|
||||
* Elevation styles
|
||||
*/
|
||||
|
||||
@mixin elevation-1 {
|
||||
border: 1px solid var(--color-border-strong);
|
||||
box-shadow: 0 1px 0 var(--color-border-strong);
|
||||
}
|
||||
|
||||
@mixin elevation-2 {
|
||||
border: 1px solid var(--color-border-strong);
|
||||
box-shadow: 1px 2px 0 var(--color-border-strong);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search input styles
|
||||
*/
|
||||
|
||||
@mixin search-input {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
@@ -57,3 +156,17 @@
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* glitch-soc additions
|
||||
*/
|
||||
|
||||
@mixin fullwidth-gallery {
|
||||
&.full-width {
|
||||
margin-left: -14px;
|
||||
margin-right: -14px;
|
||||
width: inherit;
|
||||
max-width: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
@@ -9,17 +9,10 @@ $cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;
|
||||
// Language codes that is written vertically
|
||||
$vertical-lr-langs: mn-Mong;
|
||||
|
||||
// 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;
|
||||
$mobile-menu-breakpoint: 760px;
|
||||
$mobile-breakpoint: 630px;
|
||||
$no-columns-breakpoint: 600px;
|
||||
|
||||
$font-sans-serif: 'mastodon-font-sans-serif' !default;
|
||||
$font-display: 'mastodon-font-display' !default;
|
||||
$font-monospace: 'mastodon-font-monospace' !default;
|
||||
@@ -2754,6 +2754,9 @@ a.account__display-name {
|
||||
}
|
||||
|
||||
.zoomable-image {
|
||||
--media-max-width: 100%;
|
||||
--media-max-height: 80%;
|
||||
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -2765,8 +2768,8 @@ a.account__display-name {
|
||||
user-select: none;
|
||||
|
||||
img {
|
||||
max-width: $media-modal-media-max-width;
|
||||
max-height: $media-modal-media-max-height;
|
||||
max-width: var(--media-max-width);
|
||||
max-height: var(--media-max-height);
|
||||
width: auto;
|
||||
height: auto;
|
||||
outline: 1px solid var(--color-border-media);
|
||||
@@ -2795,8 +2798,8 @@ a.account__display-name {
|
||||
}
|
||||
|
||||
&__preview {
|
||||
max-width: $media-modal-media-max-width;
|
||||
max-height: $media-modal-media-max-height;
|
||||
max-width: var(--media-max-width);
|
||||
max-height: var(--media-max-height);
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
outline: 1px solid var(--color-border-media);
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
@mixin space {
|
||||
--space-3xs: 2px;
|
||||
--space-2xs: 4px;
|
||||
--space-xs: 8px;
|
||||
--space-sm: 12px;
|
||||
--space-md: 16px;
|
||||
--space-lg: 20px;
|
||||
--space-xl: 24px;
|
||||
--space-2xl: 28px;
|
||||
--space-3xl: 32px;
|
||||
--space-4xl: 36px;
|
||||
--space-5xl: 40px;
|
||||
}
|
||||
|
||||
@mixin radius {
|
||||
--radius-xs: 8px;
|
||||
--radius-sm: 12px;
|
||||
--radius-md: 16px;
|
||||
--radius-lg: 20px;
|
||||
--radius-xl: 28px;
|
||||
--radius-round: calc(1px * infinity);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
@mixin font-size {
|
||||
--fs-3xs: 0.6875rem; // 11px
|
||||
--fs-2xs: 0.75rem; // 12px
|
||||
--fs-xs: 0.8125rem; // 13px
|
||||
--fs-sm: 0.875rem; // 14px
|
||||
--fs-md: 0.9375rem; // 15px
|
||||
--fs-lg: 1rem; // 16px
|
||||
--fs-xl: 1.25rem; // 20px
|
||||
--fs-2xl: 1.375rem; // 22px
|
||||
--fs-3xl: 1.625rem; // 26px
|
||||
}
|
||||
|
||||
@mixin line-height {
|
||||
--lh-tighter: 1.3;
|
||||
--lh-tight: 1.4;
|
||||
--lh-normal: 1.6;
|
||||
}
|
||||
|
||||
@mixin letter-spacing {
|
||||
--ls-tighter: -0.02em;
|
||||
--ls-tight: -0.01em;
|
||||
--ls-normal: 0;
|
||||
--ls-loose: 0.01em;
|
||||
--ls-looser: 0.02em;
|
||||
}
|
||||
+11
-4
@@ -1,10 +1,17 @@
|
||||
@use 'base';
|
||||
@use 'dark';
|
||||
@use 'light';
|
||||
@use 'utils';
|
||||
@use 'theme/base';
|
||||
@use 'theme/dark';
|
||||
@use 'theme/light';
|
||||
@use 'theme/utils';
|
||||
@use 'shape';
|
||||
@use 'type';
|
||||
|
||||
html {
|
||||
@include base.palette;
|
||||
@include shape.space;
|
||||
@include shape.radius;
|
||||
@include type.font-size;
|
||||
@include type.line-height;
|
||||
@include type.letter-spacing;
|
||||
}
|
||||
|
||||
[data-color-scheme='dark'],
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -55,6 +55,7 @@ export const ThemePlayground: React.FC = () => {
|
||||
</aside>
|
||||
</nav>
|
||||
<main>Test 1 2 3</main>
|
||||
<div className={classes.overlay}>Hello World</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +1,13 @@
|
||||
@use '@/styles/mastodon/mixins';
|
||||
|
||||
.wrapper {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 250px 1fr;
|
||||
gap: 1rem;
|
||||
padding: 2rem;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
gap: var(--space-md);
|
||||
padding: var(--space-3xl);
|
||||
font-size: var(--fs-lg);
|
||||
line-height: var(--lh-normal);
|
||||
overflow-wrap: break-word;
|
||||
color: var(--color-text-primary);
|
||||
background-color: var(--color-bg-blend);
|
||||
@@ -17,18 +19,19 @@
|
||||
nav {
|
||||
display: block;
|
||||
grid-template-rows: min-content;
|
||||
font-size: 14px;
|
||||
font-size: var(--fs-sm);
|
||||
|
||||
input {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
margin-block-end: 1rem;
|
||||
padding: 0.5rem 1rem;
|
||||
margin-block-end: var(--space-md);
|
||||
padding: var(--space-xs) var(--space-md);
|
||||
color: var(--color-text-primary);
|
||||
background: transparent;
|
||||
border: 1px solid var(--color-border-primary);
|
||||
border-radius: 0.5rem;
|
||||
border-radius: var(--radius-xs);
|
||||
font: inherit;
|
||||
|
||||
&:focus {
|
||||
border-color: var(--color-border-brand);
|
||||
@@ -38,9 +41,10 @@
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 0.5rem 1rem 0.45rem;
|
||||
border-radius: 0.5rem;
|
||||
padding: var(--space-xs) var(--space-md);
|
||||
border-radius: var(--radius-xs);
|
||||
color: var(--color-text-secondary);
|
||||
@include mixins.type-body-compact;
|
||||
|
||||
&[aria-current='page'] {
|
||||
color: var(--color-text-primary);
|
||||
@@ -55,22 +59,23 @@
|
||||
'subtitle button';
|
||||
grid-template-columns: 1fr min-content;
|
||||
align-items: center;
|
||||
gap: 0.125rem 0.5rem;
|
||||
margin-block-start: 1rem;
|
||||
padding: 0.75rem 1rem;
|
||||
line-height: 1.2;
|
||||
border-radius: 1rem;
|
||||
background-color: var(--color-bg-highlight);
|
||||
gap: var(--space-3xs) var(--space-xs);
|
||||
margin-block-start: var(--space-md);
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--color-border-primary);
|
||||
|
||||
h2 {
|
||||
grid-area: title;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
@include mixins.type-body;
|
||||
|
||||
line-height: var(--lh-tighter);
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
grid-area: subtitle;
|
||||
font-size: 12px;
|
||||
@include mixins.type-label-sm;
|
||||
|
||||
color: var(--color-text-secondary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -84,15 +89,31 @@
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: none;
|
||||
background-color: var(--color-bg-highlight);
|
||||
border-radius: 99rem;
|
||||
background-color: transparent;
|
||||
border-radius: var(--radius-round);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-bg-highlight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
padding: var(--space-3xl);
|
||||
background-color: var(--color-bg-primary);
|
||||
border-radius: 1rem;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
inset: auto var(--space-md) var(--space-md) auto;
|
||||
width: 30%;
|
||||
height: 35%;
|
||||
padding: var(--space-md);
|
||||
background-color: var(--color-bg-primary);
|
||||
border-radius: var(--radius-xl);
|
||||
|
||||
@include mixins.elevation-2;
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -61,18 +61,18 @@ export const NotificationFollowRequest: React.FC<{
|
||||
|
||||
const actions = (
|
||||
<>
|
||||
<IconButton
|
||||
title={intl.formatMessage(messages.reject)}
|
||||
icon='times'
|
||||
iconComponent={CloseIcon}
|
||||
onClick={onReject}
|
||||
/>
|
||||
<IconButton
|
||||
title={intl.formatMessage(messages.authorize)}
|
||||
icon='check'
|
||||
iconComponent={CheckIcon}
|
||||
onClick={onAuthorize}
|
||||
/>
|
||||
<IconButton
|
||||
title={intl.formatMessage(messages.reject)}
|
||||
icon='times'
|
||||
iconComponent={CloseIcon}
|
||||
onClick={onReject}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
|
||||
@@ -1166,7 +1166,7 @@
|
||||
"status.reblog_private": "Partekatu berriz zure jarraitzaileekin",
|
||||
"status.reblogged_by": "{name}(r)en bultzada",
|
||||
"status.reblogs.empty": "Inork ez dio bultzada eman bidalketa honi oraindik. Inork egiten badu, hemen agertuko da.",
|
||||
"status.reblogs_count": "{count, plural, one {{counter} bultzaeda} other {{counter} bultzaeda}}",
|
||||
"status.reblogs_count": "{count, plural, one {{counter} bultzada} other {{counter} bultzada}}",
|
||||
"status.redraft": "Ezabatu eta berridatzi",
|
||||
"status.remove_bookmark": "Kendu laster-marka",
|
||||
"status.remove_favourite": "Kendu gogokoetatik",
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
"account.familiar_followers_two": "ติดตามโดย {name1} และ {name2}",
|
||||
"account.featured": "น่าสนใจ",
|
||||
"account.featured.accounts": "โปรไฟล์",
|
||||
"account.filters.boosts_toggle": "แสดงการดัน",
|
||||
"account.filters.posts_only": "โพสต์",
|
||||
"account.follow": "ติดตาม",
|
||||
"account.follow_back": "ติดตามกลับ",
|
||||
"account.follow_back_short": "ติดตามกลับ",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@use 'fonts/roboto-mono';
|
||||
|
||||
@use 'mastodon/reset';
|
||||
@use 'mastodon/theme';
|
||||
@use 'mastodon/tokens';
|
||||
@use 'mastodon/basics';
|
||||
@use 'mastodon/branding';
|
||||
@use 'mastodon/containers';
|
||||
|
||||
@@ -1,3 +1,113 @@
|
||||
/**
|
||||
* Type styles
|
||||
*/
|
||||
|
||||
@mixin type-heading-lg {
|
||||
// font-family: Syne;
|
||||
font-size: var(--fs-3xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-tighter);
|
||||
}
|
||||
|
||||
@mixin type-heading-md {
|
||||
// font-family: Syne;
|
||||
font-size: var(--fs-2xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-tight);
|
||||
}
|
||||
|
||||
@mixin type-heading-sm {
|
||||
// font-family: Syne;
|
||||
font-size: var(--fs-xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tight);
|
||||
letter-spacing: var(--ls-tight);
|
||||
}
|
||||
|
||||
@mixin type-body-lg {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-lg);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-normal);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-body-strong {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-normal);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-body {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-normal);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-body-compact {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tight);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-label-lg {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tight);
|
||||
letter-spacing: var(--ls-normal);
|
||||
}
|
||||
|
||||
@mixin type-label-md {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-loose);
|
||||
}
|
||||
|
||||
@mixin type-label-sm {
|
||||
// font-family: Inter;
|
||||
font-size: var(--fs-2xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-loose);
|
||||
}
|
||||
|
||||
@mixin type-micro {
|
||||
// font-family: 'JetBrains Mono';
|
||||
font-size: var(--fs-3xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
letter-spacing: var(--ls-looser);
|
||||
}
|
||||
|
||||
/**
|
||||
* Elevation styles
|
||||
*/
|
||||
|
||||
@mixin elevation-1 {
|
||||
border: 1px solid var(--color-border-strong);
|
||||
box-shadow: 0 1px 0 var(--color-border-strong);
|
||||
}
|
||||
|
||||
@mixin elevation-2 {
|
||||
border: 1px solid var(--color-border-strong);
|
||||
box-shadow: 1px 2px 0 var(--color-border-strong);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search input styles
|
||||
*/
|
||||
|
||||
@mixin search-input {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
@@ -9,17 +9,10 @@ $cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;
|
||||
// Language codes that is written vertically
|
||||
$vertical-lr-langs: mn-Mong;
|
||||
|
||||
// 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;
|
||||
$mobile-menu-breakpoint: 760px;
|
||||
$mobile-breakpoint: 630px;
|
||||
$no-columns-breakpoint: 600px;
|
||||
|
||||
$font-sans-serif: 'mastodon-font-sans-serif' !default;
|
||||
$font-display: 'mastodon-font-display' !default;
|
||||
$font-monospace: 'mastodon-font-monospace' !default;
|
||||
@@ -2688,6 +2688,9 @@ a.account__display-name {
|
||||
}
|
||||
|
||||
.zoomable-image {
|
||||
--media-max-width: 100%;
|
||||
--media-max-height: 80%;
|
||||
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -2699,8 +2702,8 @@ a.account__display-name {
|
||||
user-select: none;
|
||||
|
||||
img {
|
||||
max-width: $media-modal-media-max-width;
|
||||
max-height: $media-modal-media-max-height;
|
||||
max-width: var(--media-max-width);
|
||||
max-height: var(--media-max-height);
|
||||
width: auto;
|
||||
height: auto;
|
||||
outline: 1px solid var(--color-border-media);
|
||||
@@ -2729,8 +2732,8 @@ a.account__display-name {
|
||||
}
|
||||
|
||||
&__preview {
|
||||
max-width: $media-modal-media-max-width;
|
||||
max-height: $media-modal-media-max-height;
|
||||
max-width: var(--media-max-width);
|
||||
max-height: var(--media-max-height);
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
outline: 1px solid var(--color-border-media);
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
@mixin space {
|
||||
--space-3xs: 2px;
|
||||
--space-2xs: 4px;
|
||||
--space-xs: 8px;
|
||||
--space-sm: 12px;
|
||||
--space-md: 16px;
|
||||
--space-lg: 20px;
|
||||
--space-xl: 24px;
|
||||
--space-2xl: 28px;
|
||||
--space-3xl: 32px;
|
||||
--space-4xl: 36px;
|
||||
--space-5xl: 40px;
|
||||
}
|
||||
|
||||
@mixin radius {
|
||||
--radius-xs: 8px;
|
||||
--radius-sm: 12px;
|
||||
--radius-md: 16px;
|
||||
--radius-lg: 20px;
|
||||
--radius-xl: 28px;
|
||||
--radius-round: calc(1px * infinity);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
@mixin font-size {
|
||||
--fs-3xs: 0.6875rem; // 11px
|
||||
--fs-2xs: 0.75rem; // 12px
|
||||
--fs-xs: 0.8125rem; // 13px
|
||||
--fs-sm: 0.875rem; // 14px
|
||||
--fs-md: 0.9375rem; // 15px
|
||||
--fs-lg: 1rem; // 16px
|
||||
--fs-xl: 1.25rem; // 20px
|
||||
--fs-2xl: 1.375rem; // 22px
|
||||
--fs-3xl: 1.625rem; // 26px
|
||||
}
|
||||
|
||||
@mixin line-height {
|
||||
--lh-tighter: 1.3;
|
||||
--lh-tight: 1.4;
|
||||
--lh-normal: 1.6;
|
||||
}
|
||||
|
||||
@mixin letter-spacing {
|
||||
--ls-tighter: -0.02em;
|
||||
--ls-tight: -0.01em;
|
||||
--ls-normal: 0;
|
||||
--ls-loose: 0.01em;
|
||||
--ls-looser: 0.02em;
|
||||
}
|
||||
+11
-4
@@ -1,10 +1,17 @@
|
||||
@use 'base';
|
||||
@use 'dark';
|
||||
@use 'light';
|
||||
@use 'utils';
|
||||
@use 'theme/base';
|
||||
@use 'theme/dark';
|
||||
@use 'theme/light';
|
||||
@use 'theme/utils';
|
||||
@use 'shape';
|
||||
@use 'type';
|
||||
|
||||
html {
|
||||
@include base.palette;
|
||||
@include shape.space;
|
||||
@include shape.radius;
|
||||
@include type.font-size;
|
||||
@include type.line-height;
|
||||
@include type.letter-spacing;
|
||||
}
|
||||
|
||||
[data-color-scheme='dark'],
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -14,7 +14,7 @@ class REST::CredentialAccountSerializer < REST::AccountSerializer
|
||||
language: user.setting_default_language,
|
||||
note: object.note,
|
||||
fields: object.fields.map(&:to_h),
|
||||
follow_requests_count: FollowRequest.where(target_account: object).limit(40).count,
|
||||
follow_requests_count: Account.without_suspended.joins(:follow_requests).where(follow_requests: { target_account: object }).limit(40).count,
|
||||
hide_collections: object.hide_collections,
|
||||
discoverable: object.discoverable,
|
||||
indexable: object.indexable,
|
||||
|
||||
@@ -15,10 +15,14 @@ class ActivityPub::FetchRemoteActorService < BaseService
|
||||
|
||||
@json = begin
|
||||
if prefetched_body.nil?
|
||||
fetch_resource(uri, true)
|
||||
fetch_resource(uri, true, raise_on_error: :all)
|
||||
else
|
||||
body_to_json(prefetched_body, compare_id: uri)
|
||||
end
|
||||
rescue Mastodon::UnexpectedResponseError => e
|
||||
queue_deletion!(uri) if e.response.code == 410
|
||||
|
||||
raise Error, "Error fetching actor JSON at #{uri} (HTTP #{e.response.code})"
|
||||
rescue JSON::ParserError
|
||||
raise Error, "Error parsing JSON-LD document #{uri}"
|
||||
end
|
||||
@@ -39,6 +43,16 @@ class ActivityPub::FetchRemoteActorService < BaseService
|
||||
|
||||
private
|
||||
|
||||
def queue_deletion!(uri)
|
||||
account = Account.find_by(uri:)
|
||||
return unless account&.remote?
|
||||
|
||||
Rails.logger.debug { "Deleting actor #{uri} because of HTTP 410 response" }
|
||||
|
||||
account.suspend!(origin: :remote)
|
||||
AccountDeletionWorker.perform_async(account.id, { 'reserve_username' => false, 'skip_activitypub' => true })
|
||||
end
|
||||
|
||||
def supported_context?
|
||||
super(@json)
|
||||
end
|
||||
|
||||
@@ -1013,6 +1013,7 @@ de:
|
||||
critical_update: Kritisch — bitte zügig aktualisieren
|
||||
description: Es wird empfohlen, deine Mastodon-Installation auf dem aktuellen Stand zu halten, um von den neuesten Fehlerkorrekturen und Funktionen zu profitieren. Darüber hinaus ist es wichtig, Mastodon zeitnah zu aktualisieren, um Sicherheitslücken zu schließen. Aus diesen Gründen prüft Mastodon alle 30 Minuten auf Updates und du wirst deinen Einstellungen entsprechend per E-Mail informiert.
|
||||
documentation_link: Mehr erfahren
|
||||
nearing_eol: Der aktuelle Branch wird ab dem %{date} nicht mehr unterstützt. Bitte ziehe eine Aktualisierung in Erwägung.
|
||||
release_notes: Versionshinweise
|
||||
supported_until: Support endet am %{date}
|
||||
title: Verfügbare Updates
|
||||
@@ -1021,6 +1022,7 @@ de:
|
||||
major: Hauptversion
|
||||
minor: Nebenversion
|
||||
patch: Revision — Fehlerkorrekturen und einfach zu implementierende Änderungen
|
||||
unsupported_branch: Der aktuelle Branch wird nicht mehr unterstützt. Bitte führe so bald wie möglich eine Aktualisierung durch.
|
||||
unsupported_since: Nicht mehr unterstützt seit %{date}
|
||||
version: Version
|
||||
statuses:
|
||||
@@ -1287,6 +1289,15 @@ de:
|
||||
auto_close_registrations:
|
||||
body: Aufgrund fehlender Aktivität von Moderator*innen müssen neue Registrierungen auf %{instance} jetzt manuell genehmigt werden. Dies wurde automatisch umgestellt, damit %{instance} nicht als Plattform für Böswillige missbraucht werden kann. Du kannst jederzeit auf uneingeschränkte Registrierungen zurückwechseln.
|
||||
subject: Registrierungen auf %{instance} müssen ab jetzt manuell genehmigt werden (automatisch umgestellt)
|
||||
end_of_support_out_of_support_warning:
|
||||
body: Die derzeitige Mastodon-Version wird nicht mehr unterstützt. Bitte führe so bald wie möglich eine Aktualisierung durch!
|
||||
subject: Mastodon %{branch} auf %{instance} wird nicht länger unterstützt!
|
||||
end_of_support_three_months_warning:
|
||||
body: Die derzeitige Mastodon-Version wird in 3 Monaten nicht mehr unterstützt. Bitte führe so bald wie möglich eine Aktualisierung auf einen neueren Branch durch.
|
||||
subject: Mastodon %{branch} auf %{instance} wird in 3 Monaten nicht mehr unterstützt.
|
||||
end_of_support_two_weeks_warning:
|
||||
body: Die derzeitige Mastodon-Version wird in 2 Wochen nicht mehr unterstützt. Bitte führe so bald wie möglich eine Aktualisierung auf einen neueren Branch durch.
|
||||
subject: Mastodon %{branch} auf %{instance} wird in 2 Wochen nicht mehr unterstützt.
|
||||
new_appeal:
|
||||
actions:
|
||||
delete_statuses: das Löschen der Beiträge
|
||||
|
||||
@@ -345,6 +345,7 @@ de:
|
||||
notification_emails:
|
||||
appeal: Jemand hat Einspruch gegen eine Maßnahme erhoben
|
||||
digest: Zusammenfassung senden
|
||||
end_of_support: Die derzeitige Mastodon-Version wird bald nicht mehr unterstützt
|
||||
favourite: Jemand favorisierte meinen Beitrag
|
||||
follow: Ein neues Profil folgt mir
|
||||
follow_request: Jemand möchte mir folgen
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../support/signing_keys_helpers'
|
||||
|
||||
Fabricator(:account) do
|
||||
transient :suspended, :silenced, :legacy_keypair
|
||||
username { sequence(:username) { |i| "#{Faker::Internet.user_name(separators: %w(_))}#{i}" } }
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../support/signing_keys_helpers'
|
||||
|
||||
Fabricator(:keypair) do
|
||||
account { Fabricate(:account, keypairs: []) }
|
||||
type :rsa
|
||||
|
||||
@@ -32,6 +32,51 @@ RSpec.describe ActivityPub::FetchRemoteActorService do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the account is already known and the actor document returns a temporary error' do
|
||||
let!(:known_account) { Fabricate(:remote_account, uri: 'https://example.com/alice') }
|
||||
|
||||
before do
|
||||
stub_request(:get, 'https://example.com/alice').to_return(status: 500)
|
||||
end
|
||||
|
||||
it 'returns nil but keeps the existing account intact' do
|
||||
expect(account).to be_nil
|
||||
expect(known_account.reload.suspended?).to be false
|
||||
expect(a_request(:get, 'https://example.com/alice')).to have_been_made.once
|
||||
expect(AccountDeletionWorker).to_not have_enqueued_sidekiq_job
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the account is already known and the actor document returns a 404 not found error' do
|
||||
let!(:known_account) { Fabricate(:remote_account, uri: 'https://example.com/alice') }
|
||||
|
||||
before do
|
||||
stub_request(:get, 'https://example.com/alice').to_return(status: 404)
|
||||
end
|
||||
|
||||
it 'returns nil but keeps the existing account intact' do
|
||||
expect(account).to be_nil
|
||||
expect(known_account.reload.suspended?).to be false
|
||||
expect(a_request(:get, 'https://example.com/alice')).to have_been_made.once
|
||||
expect(AccountDeletionWorker).to_not have_enqueued_sidekiq_job
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the account is already known and the actor document returns a 410 gone error' do
|
||||
let!(:known_account) { Fabricate(:remote_account, uri: 'https://example.com/alice') }
|
||||
|
||||
before do
|
||||
stub_request(:get, 'https://example.com/alice').to_return(status: 410)
|
||||
end
|
||||
|
||||
it 'returns nil and marks the known account for deletion' do
|
||||
expect(account).to be_nil
|
||||
expect(known_account.reload.suspended?).to be true
|
||||
expect(a_request(:get, 'https://example.com/alice')).to have_been_made.once
|
||||
expect(AccountDeletionWorker).to have_enqueued_sidekiq_job(known_account.id, { 'reserve_username' => false, 'skip_activitypub' => true })
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the account does not have a inbox' do
|
||||
before do
|
||||
actor[:inbox] = nil
|
||||
|
||||
@@ -15105,8 +15105,8 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"ws@npm:^8.12.1, ws@npm:^8.18.0, ws@npm:^8.19.0, ws@npm:^8.21.0":
|
||||
version: 8.21.0
|
||||
resolution: "ws@npm:8.21.0"
|
||||
version: 8.21.1
|
||||
resolution: "ws@npm:8.21.1"
|
||||
peerDependencies:
|
||||
bufferutil: ^4.0.1
|
||||
utf-8-validate: ">=5.0.2"
|
||||
@@ -15115,7 +15115,7 @@ __metadata:
|
||||
optional: true
|
||||
utf-8-validate:
|
||||
optional: true
|
||||
checksum: 10c0/ef4a243476283fc49bc7550966c4af4aa0eef56273837211e700de3b664e08604a760cdddcb5ba43c049140e74ccfec5b0ee0bb439e08c2adf9138902fdde5f9
|
||||
checksum: 10c0/c4c6f1d95f6d465262de2037c57c715725d67e078dd49420ede4e19115668aba159cb64d85c5e89c06eb2826be599e62e5095860ad6cc54ff42e8bd7684e1db8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in new issue
Block a user