Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
2c471966
Commit
2c471966
authored
3 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
wip: refactor(client): migrate components to composition api
parent
901453ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/client/src/pages/about-misskey.vue
+49
-59
49 additions, 59 deletions
packages/client/src/pages/about-misskey.vue
with
49 additions
and
59 deletions
packages/client/src/pages/about-misskey.vue
+
49
−
59
View file @
2c471966
...
...
@@ -3,36 +3,36 @@
<MkSpacer
:content-max=
"600"
:margin-min=
"20"
>
<div
class=
"_formRoot znqjceqz"
>
<div
id=
"debug"
></div>
<div
ref=
"
about
"
v-panel
class=
"_formBlock about"
:class=
"
{ playing: easterEggEngine != null }">
<div
ref=
"
containerEl
"
v-panel
class=
"_formBlock about"
:class=
"
{ playing: easterEggEngine != null }">
<img
src=
"/client-assets/about-icon.png"
alt=
""
class=
"icon"
draggable=
"false"
@
load=
"iconLoaded"
@
click=
"gravity"
/>
<div
class=
"misskey"
>
Misskey
</div>
<div
class=
"version"
>
v
{{
version
}}
</div>
<span
v-for=
"emoji in easterEggEmojis"
:key=
"emoji.id"
class=
"emoji"
:data-physics-x=
"emoji.left"
:data-physics-y=
"emoji.top"
:class=
"
{ _physics_circle_: !emoji.emoji.startsWith(':') }">
<MkEmoji
class=
"emoji"
:emoji=
"emoji.emoji"
:custom-emojis=
"$instance.emojis"
:is-reaction=
"false"
:normal=
"true"
:no-style=
"true"
/></span>
</div>
<div
class=
"_formBlock"
style=
"text-align: center;"
>
{{
$ts
.
_aboutMisskey
.
about
}}
<br><a
href=
"https://misskey-hub.net/docs/misskey.html"
target=
"_blank"
class=
"_link"
>
{{
$ts
.
learnMore
}}
</a>
{{
i18n
.
locale
.
_aboutMisskey
.
about
}}
<br><a
href=
"https://misskey-hub.net/docs/misskey.html"
target=
"_blank"
class=
"_link"
>
{{
i18n
.
locale
.
learnMore
}}
</a>
</div>
<FormSection>
<div
class=
"_formLinks"
>
<FormLink
to=
"https://github.com/misskey-dev/misskey"
external
>
<template
#icon
><i
class=
"fas fa-code"
></i></
template
>
{{
$ts
._aboutMisskey.source }}
{{
i18n.locale
._aboutMisskey.source }}
<
template
#suffix
>
GitHub
</
template
>
</FormLink>
<FormLink
to=
"https://crowdin.com/project/misskey"
external
>
<
template
#icon
><i
class=
"fas fa-language"
></i></
template
>
{{
$ts
._aboutMisskey.translation }}
{{
i18n.locale
._aboutMisskey.translation }}
<
template
#suffix
>
Crowdin
</
template
>
</FormLink>
<FormLink
to=
"https://www.patreon.com/syuilo"
external
>
<
template
#icon
><i
class=
"fas fa-hand-holding-medical"
></i></
template
>
{{
$ts
._aboutMisskey.donate }}
{{
i18n.locale
._aboutMisskey.donate }}
<
template
#suffix
>
Patreon
</
template
>
</FormLink>
</div>
</FormSection>
<FormSection>
<
template
#label
>
{{
$ts
.
_aboutMisskey
.
contributors
}}
</
template
>
<
template
#label
>
{{
i18n
.
locale
.
_aboutMisskey
.
contributors
}}
</
template
>
<div
class=
"_formLinks"
>
<FormLink
to=
"https://github.com/syuilo"
external
>
@syuilo
</FormLink>
<FormLink
to=
"https://github.com/AyaMorisawa"
external
>
@AyaMorisawa
</FormLink>
...
...
@@ -44,20 +44,20 @@
<FormLink
to=
"https://github.com/u1-liquid"
external
>
@u1-liquid
</FormLink>
<FormLink
to=
"https://github.com/marihachi"
external
>
@marihachi
</FormLink>
</div>
<
template
#caption
><MkLink
url=
"https://github.com/misskey-dev/misskey/graphs/contributors"
>
{{
$ts
.
_aboutMisskey
.
allContributors
}}
</MkLink></
template
>
<
template
#caption
><MkLink
url=
"https://github.com/misskey-dev/misskey/graphs/contributors"
>
{{
i18n
.
locale
.
_aboutMisskey
.
allContributors
}}
</MkLink></
template
>
</FormSection>
<FormSection>
<
template
#label
><Mfm
text=
"$[jelly ❤]"
/>
{{
$ts
.
_aboutMisskey
.
patrons
}}
</
template
>
<
template
#label
><Mfm
text=
"$[jelly ❤]"
/>
{{
i18n
.
locale
.
_aboutMisskey
.
patrons
}}
</
template
>
<div
v-for=
"patron in patrons"
:key=
"patron"
>
{{ patron }}
</div>
<
template
#caption
>
{{
$ts
.
_aboutMisskey
.
morePatrons
}}
</
template
>
<
template
#caption
>
{{
i18n
.
locale
.
_aboutMisskey
.
morePatrons
}}
</
template
>
</FormSection>
</div>
</MkSpacer>
</div>
</template>
<
script
lang=
"ts"
>
import
{
defineCompone
nt
}
from
'
vue
'
;
<
script
lang=
"ts"
setup
>
import
{
nextTick
,
onBeforeUnmou
nt
}
from
'
vue
'
;
import
{
version
}
from
'
@/config
'
;
import
FormLink
from
'
@/components/form/link.vue
'
;
import
FormSection
from
'
@/components/form/section.vue
'
;
...
...
@@ -65,6 +65,8 @@ import MkKeyValue from '@/components/key-value.vue';
import
MkLink
from
'
@/components/link.vue
'
;
import
{
physics
}
from
'
@/scripts/physics
'
;
import
*
as
symbols
from
'
@/symbols
'
;
import
{
i18n
}
from
'
@/i18n
'
;
import
{
defaultStore
}
from
'
@/store
'
;
const
patrons
=
[
'
まっちゃとーにゅ
'
,
...
...
@@ -145,59 +147,47 @@ const patrons = [
'
蝉暮せせせ
'
,
];
export
default
defineComponent
({
components
:
{
FormSection
,
FormLink
,
MkKeyValue
,
MkLink
,
},
data
()
{
return
{
[
symbols
.
PAGE_INFO
]:
{
title
:
this
.
$ts
.
aboutMisskey
,
icon
:
null
},
version
,
patrons
,
easterEggReady
:
false
,
easterEggEmojis
:
[],
easterEggEngine
:
null
,
}
},
beforeUnmount
()
{
if
(
this
.
easterEggEngine
)
{
this
.
easterEggEngine
.
stop
();
}
},
let
easterEggReady
=
false
;
let
easterEggEmojis
=
$ref
([]);
let
easterEggEngine
=
$ref
(
null
);
const
containerEl
=
$ref
<
HTMLElement
>
();
function
iconLoaded
()
{
const
emojis
=
defaultStore
.
state
.
reactions
;
const
containerWidth
=
containerEl
.
offsetWidth
;
for
(
let
i
=
0
;
i
<
32
;
i
++
)
{
easterEggEmojis
.
push
({
id
:
i
.
toString
(),
top
:
-
(
128
+
(
Math
.
random
()
*
256
)),
left
:
(
Math
.
random
()
*
containerWidth
),
emoji
:
emojis
[
Math
.
floor
(
Math
.
random
()
*
emojis
.
length
)],
});
}
methods
:
{
iconLoaded
()
{
const
emojis
=
this
.
$store
.
state
.
reactions
;
const
containerWidth
=
this
.
$refs
.
about
.
offsetWidth
;
for
(
let
i
=
0
;
i
<
32
;
i
++
)
{
this
.
easterEggEmojis
.
push
({
id
:
i
.
toString
(),
top
:
-
(
128
+
(
Math
.
random
()
*
256
)),
left
:
(
Math
.
random
()
*
containerWidth
),
emoji
:
emojis
[
Math
.
floor
(
Math
.
random
()
*
emojis
.
length
)],
});
}
nextTick
(()
=>
{
easterEggReady
=
true
;
});
}
this
.
$nextTick
(()
=>
{
this
.
easterEggReady
=
true
;
});
},
function
gravity
()
{
if
(
!
easterEggReady
)
return
;
easterEggReady
=
false
;
easterEggEngine
=
physics
(
containerEl
);
}
gravity
()
{
if
(
!
this
.
easterEggReady
)
return
;
this
.
easterEggReady
=
false
;
this
.
easterEggEngine
=
physics
(
this
.
$refs
.
about
);
}
onBeforeUnmount
(()
=>
{
if
(
easterEggEngine
)
{
easterEggEngine
.
stop
();
}
});
defineExpose
({
[
symbols
.
PAGE_INFO
]:
{
title
:
i18n
.
locale
.
aboutMisskey
,
icon
:
null
,
bg
:
'
var(--bg)
'
,
},
});
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment