Merge tag 'tags/2024.3.2' from upstream Sharkey
This commit is contained in:
commit
80162565d6
25 changed files with 272 additions and 121 deletions
|
@ -43,6 +43,7 @@ export async function signout() {
|
|||
waiting();
|
||||
miLocalStorage.removeItem('account');
|
||||
await removeAccount($i.id);
|
||||
document.cookie = `token=; path=/; max-age=0${ location.protocol === 'https:' ? '; Secure' : ''}`;
|
||||
const accounts = await getAccounts();
|
||||
|
||||
//#region Remove service worker registration
|
||||
|
@ -200,7 +201,7 @@ export async function login(token: Account['token'], redirect?: string) {
|
|||
throw reason;
|
||||
});
|
||||
miLocalStorage.setItem('account', JSON.stringify(me));
|
||||
document.cookie = `token=${token}; path=/; max-age=31536000`; // bull dashboardの認証とかで使う
|
||||
document.cookie = `token=${token}; path=/; max-age=31536000${ location.protocol === 'https:' ? '; Secure' : ''}`; // bull dashboardの認証とかで使う
|
||||
await addAccount(me.id, token);
|
||||
|
||||
if (redirect) {
|
||||
|
|
|
@ -73,27 +73,31 @@ export async function mainBoot() {
|
|||
mainRouter.push('/search');
|
||||
},
|
||||
};
|
||||
|
||||
if (defaultStore.state.enableSeasonalScreenEffect) {
|
||||
const month = new Date().getMonth() + 1;
|
||||
if (defaultStore.state.hemisphere === 'S') {
|
||||
// ▼南半球
|
||||
if (month === 7 || month === 8) {
|
||||
const SnowfallEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
|
||||
new SnowfallEffect({}).render();
|
||||
try {
|
||||
if (defaultStore.state.enableSeasonalScreenEffect) {
|
||||
const month = new Date().getMonth() + 1;
|
||||
if (defaultStore.state.hemisphere === 'S') {
|
||||
// ▼南半球
|
||||
if (month === 7 || month === 8) {
|
||||
const SnowfallEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
|
||||
new SnowfallEffect({}).render();
|
||||
}
|
||||
} else {
|
||||
// ▼北半球
|
||||
if (month === 12 || month === 1) {
|
||||
const SnowfallEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
|
||||
new SnowfallEffect({}).render();
|
||||
} else if (month === 3 || month === 4) {
|
||||
const SakuraEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
|
||||
new SakuraEffect({
|
||||
sakura: true,
|
||||
}).render();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// ▼北半球
|
||||
if (month === 12 || month === 1) {
|
||||
const SnowfallEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
|
||||
new SnowfallEffect({}).render();
|
||||
} else if (month === 3 || month === 4) {
|
||||
const SakuraEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
|
||||
new SakuraEffect({
|
||||
sakura: true,
|
||||
}).render();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
// console.error(error);
|
||||
console.error('Failed to initialise the seasonal screen effect canvas context:', error);
|
||||
}
|
||||
|
||||
if ($i) {
|
||||
|
|
|
@ -72,12 +72,16 @@ watch(() => props.lang, (to) => {
|
|||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
.codeBlockRoot {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.codeBlockRoot :global(.shiki) > code {
|
||||
counter-reset: step;
|
||||
counter-increment: step 0;
|
||||
}
|
||||
|
||||
.codeBlockRoot :global(.shiki) > code > .line::before {
|
||||
.codeBlockRoot :global(.shiki) > code > span::before {
|
||||
content: counter(step);
|
||||
counter-increment: step;
|
||||
width: 1rem;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
worker-src 'self';
|
||||
script-src 'self' 'unsafe-eval' https://*.hcaptcha.com https://challenges.cloudflare.com;
|
||||
style-src 'self' 'unsafe-inline';
|
||||
img-src 'self' data: blob: www.google.com xn--931a.moe launcher.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
||||
img-src 'self' data: blob: www.google.com xn--931a.moe launcher.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 activitypub.software secure.gravatar.com avatars.githubusercontent.com;
|
||||
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
||||
connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com;
|
||||
frame-src *;"
|
||||
|
|
|
@ -77,14 +77,34 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<FormSection>
|
||||
<template #label>{{ i18n.ts._aboutMisskey.projectMembers }}</template>
|
||||
<div :class="$style.contributors" style="margin-bottom: 8px;">
|
||||
<a href="https://activitypub.software/Marie" target="_blank" :class="$style.contributor">
|
||||
<img src="https://activitypub.software/uploads/-/system/user/avatar/2/avatar.png?width=128" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@Marie</span>
|
||||
</a>
|
||||
<a href="https://activitypub.software/Amelia" target="_blank" :class="$style.contributor">
|
||||
<img src="https://activitypub.software/uploads/-/system/user/avatar/1/avatar.png?width=128" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@Amelia</span>
|
||||
</a>
|
||||
<a href="https://activitypub.software/dakkar" target="_blank" :class="$style.contributor">
|
||||
<img src="https://secure.gravatar.com/avatar/c71b315eed7c63ff94c42b1b3e8dbad1?s=192&d=identicon" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@dakkar</span>
|
||||
</a>
|
||||
<a href="https://activitypub.software/esm" target="_blank" :class="$style.contributor">
|
||||
<img src="https://secure.gravatar.com/avatar/00fd054610e2a9dcf97a2aa661b168d0?s=192&d=identicon" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@esm</span>
|
||||
</a>
|
||||
<a href="https://activitypub.software/supakaity" target="_blank" :class="$style.contributor">
|
||||
<img src="https://activitypub.software/uploads/-/system/user/avatar/65/avatar.png?width=40" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@supakaity</span>
|
||||
</a>
|
||||
<a href="https://activitypub.software/julia" target="_blank" :class="$style.contributor">
|
||||
<img src="https://activitypub.software/uploads/-/system/user/avatar/41/avatar.png?width=40" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@julia</span>
|
||||
</a>
|
||||
<a href="https://activitypub.software/Leah" target="_blank" :class="$style.contributor">
|
||||
<img src="https://secure.gravatar.com/avatar/3b35b921b284ccfd1fe348508f6f705b?s=80&d=identicon" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@Leah</span>
|
||||
</a>
|
||||
<a href="https://activitypub.software/fEmber" target="_blank" :class="$style.contributor">
|
||||
<img src="https://secure.gravatar.com/avatar/ea0ea6451fdb74311efad369bdce018e?s=80&d=identicon" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@fEmber</span>
|
||||
</a>
|
||||
</div>
|
||||
<template #caption><MkLink url="https://activitypub.software/TransFem-org/Sharkey/-/graphs/develop">{{ i18n.ts._aboutMisskey.allContributors }}</MkLink></template>
|
||||
</FormSection>
|
||||
|
|
|
@ -85,7 +85,7 @@ async function search() {
|
|||
|
||||
if (query == null || query === '') return;
|
||||
|
||||
if (query.startsWith('https://')) {
|
||||
if (query.startsWith('http://') || query.startsWith('https://')) {
|
||||
const promise = misskeyApi('ap/show', {
|
||||
uri: query,
|
||||
});
|
||||
|
|
|
@ -48,7 +48,7 @@ async function search() {
|
|||
|
||||
if (query == null || query === '') return;
|
||||
|
||||
if (query.startsWith('https://')) {
|
||||
if (query.startsWith('http://') || query.startsWith('https://')) {
|
||||
const promise = misskeyApi('ap/show', {
|
||||
uri: query,
|
||||
});
|
||||
|
|
|
@ -40,7 +40,7 @@ const isScrolling = ref(false);
|
|||
const scrollEl = shallowRef<HTMLElement>();
|
||||
|
||||
misskeyApiGet('notes/featured').then(_notes => {
|
||||
notes.value = _notes;
|
||||
notes.value = _notes.filter(n => n.cw == null);
|
||||
});
|
||||
|
||||
onUpdated(() => {
|
||||
|
|
|
@ -28,7 +28,7 @@ export async function lookup(router?: Router) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (query.startsWith('https://')) {
|
||||
if (query.startsWith('http://') || query.startsWith('https://')) {
|
||||
const promise = misskeyApi('ap/show', {
|
||||
uri: query,
|
||||
});
|
||||
|
|
|
@ -155,7 +155,9 @@ export class SnowfallEffect {
|
|||
max: 0.125,
|
||||
easing: 0.0005,
|
||||
};
|
||||
|
||||
/**
|
||||
* @throws {Error} - Thrown when it fails to get WebGL context for the canvas
|
||||
*/
|
||||
constructor(options: {
|
||||
sakura?: boolean;
|
||||
}) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue