refactor: migrate to nuxt compatibilityVersion: 4 (#3298)
This commit is contained in:
parent
46e4433e1c
commit
a3fbc056a9
342 changed files with 1200 additions and 2932 deletions
38
app/constants/index.ts
Normal file
38
app/constants/index.ts
Normal file
|
@ -0,0 +1,38 @@
|
|||
import type { mastodon } from 'masto'
|
||||
|
||||
export const APP_NAME = 'Elk'
|
||||
|
||||
export const DEFAULT_POST_CHARS_LIMIT = 500
|
||||
export const DEFAULT_FONT_SIZE = '15px'
|
||||
|
||||
export const ELK_PAGE_LIFECYCLE_FROZEN = 'elk-frozen'
|
||||
|
||||
export const STORAGE_KEY_DRAFTS = 'elk-drafts'
|
||||
export const STORAGE_KEY_USERS = 'elk-users'
|
||||
export const STORAGE_KEY_SERVERS = 'elk-servers'
|
||||
export const STORAGE_KEY_NODES = 'elk-nodes'
|
||||
export const STORAGE_KEY_CURRENT_USER_HANDLE = 'elk-current-user-handle'
|
||||
export const STORAGE_KEY_NOTIFY_TAB = 'elk-notify-tab'
|
||||
export const STORAGE_KEY_SETTINGS = 'elk-settings'
|
||||
export const STORAGE_KEY_CUSTOM_EMOJIS = 'elk-custom-emojis'
|
||||
export const STORAGE_KEY_HIDE_EXPLORE_POSTS_TIPS = 'elk-hide-explore-posts-tips'
|
||||
export const STORAGE_KEY_HIDE_EXPLORE_NEWS_TIPS = 'elk-hide-explore-news-tips'
|
||||
export const STORAGE_KEY_HIDE_EXPLORE_TAGS_TIPS = 'elk-hide-explore-tags-tips'
|
||||
export const STORAGE_KEY_NOTIFICATION = 'elk-notification'
|
||||
export const STORAGE_KEY_NOTIFICATION_POLICY = 'elk-notification-policy'
|
||||
export const STORAGE_KEY_PWA_HIDE_INSTALL = 'elk-pwa-hide-install'
|
||||
export const STORAGE_KEY_LAST_ACCESSED_NOTIFICATION_ROUTE = 'elk-last-accessed-notification-route'
|
||||
export const STORAGE_KEY_LAST_ACCESSED_EXPLORE_ROUTE = 'elk-last-accessed-explore-route'
|
||||
export const STORAGE_KEY_BOTTOM_NAV_BUTTONS = 'elk-bottom-nav-buttons'
|
||||
|
||||
export const HANDLED_MASTO_URLS = /^(https?:\/\/)?([\w\-]+\.)+\w+\/(@[@\w\-.]+)(\/objects)?(\/\d+)?$/
|
||||
|
||||
export const NOTIFICATION_FILTER_TYPES: mastodon.v1.NotificationType[] = ['status', 'reblog', 'follow', 'follow_request', 'favourite', 'poll', 'update', 'admin.sign_up', 'admin.report']
|
||||
|
||||
export const THEME_COLORS = {
|
||||
defaultTheme: '#cc7d24',
|
||||
themeDark: '#111111',
|
||||
themeLight: '#fafafa',
|
||||
backgroundDark: '#fafafa',
|
||||
backgroundLight: '#111111',
|
||||
} as const
|
7
app/constants/options.ts
Normal file
7
app/constants/options.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
export const oldFontSizeMap = {
|
||||
xs: '13px',
|
||||
sm: '14px',
|
||||
md: '15px',
|
||||
lg: '16px',
|
||||
xl: '17px',
|
||||
}
|
5
app/constants/symbols.ts
Normal file
5
app/constants/symbols.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import type { InjectionKey } from 'vue'
|
||||
|
||||
export const InjectionKeyDropdownContext: InjectionKey<{
|
||||
hide: () => void
|
||||
}> = Symbol('dropdown-context')
|
146
app/constants/themes.json
Normal file
146
app/constants/themes.json
Normal file
|
@ -0,0 +1,146 @@
|
|||
[
|
||||
[
|
||||
"#cc7d24",
|
||||
{
|
||||
"--theme-color-name": "#cc7d24",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#b16605",
|
||||
"--c-primary-light": "#cc7d2480",
|
||||
"--c-primary-fade": "#c7781f1a",
|
||||
"--rgb-primary": "204, 125, 36",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#b66b0d",
|
||||
"--c-dark-primary-light": "#d1822980",
|
||||
"--c-dark-primary-fade": "#cc7d241a",
|
||||
"--rgb-dark-primary": "204, 125, 36"
|
||||
}
|
||||
],
|
||||
[
|
||||
"#8d9614",
|
||||
{
|
||||
"--theme-color-name": "#8d9614",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#747f00",
|
||||
"--c-primary-light": "#8d961480",
|
||||
"--c-primary-fade": "#88910c1a",
|
||||
"--rgb-primary": "141, 150, 20",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#798300",
|
||||
"--c-dark-primary-light": "#929b1b80",
|
||||
"--c-dark-primary-fade": "#8d96141a",
|
||||
"--rgb-dark-primary": "141, 150, 20"
|
||||
}
|
||||
],
|
||||
[
|
||||
"#24a451",
|
||||
{
|
||||
"--theme-color-name": "#24a451",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#008c3b",
|
||||
"--c-primary-light": "#24a45180",
|
||||
"--c-primary-fade": "#1c9f4d1a",
|
||||
"--rgb-primary": "36, 164, 81",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#00903f",
|
||||
"--c-dark-primary-light": "#2ba95580",
|
||||
"--c-dark-primary-fade": "#24a4511a",
|
||||
"--rgb-dark-primary": "36, 164, 81"
|
||||
}
|
||||
],
|
||||
[
|
||||
"#00a99b",
|
||||
{
|
||||
"--theme-color-name": "#00a99b",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#009184",
|
||||
"--c-primary-light": "#00a99b80",
|
||||
"--c-primary-fade": "#00a4961a",
|
||||
"--rgb-primary": "0, 169, 155",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#009688",
|
||||
"--c-dark-primary-light": "#13aea080",
|
||||
"--c-dark-primary-fade": "#00a99b1a",
|
||||
"--rgb-dark-primary": "0, 169, 155"
|
||||
}
|
||||
],
|
||||
[
|
||||
"#00a6df",
|
||||
{
|
||||
"--theme-color-name": "#00a6df",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#008ec6",
|
||||
"--c-primary-light": "#00a6df80",
|
||||
"--c-primary-fade": "#00a1da1a",
|
||||
"--rgb-primary": "0, 166, 223",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#0093cb",
|
||||
"--c-dark-primary-light": "#17abe480",
|
||||
"--c-dark-primary-fade": "#00a6df1a",
|
||||
"--rgb-dark-primary": "0, 166, 223"
|
||||
}
|
||||
],
|
||||
[
|
||||
"#0097fd",
|
||||
{
|
||||
"--theme-color-name": "#0097fd",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#0080e3",
|
||||
"--c-primary-light": "#0097fd80",
|
||||
"--c-primary-fade": "#0092f81a",
|
||||
"--rgb-primary": "0, 151, 253",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#0085e5",
|
||||
"--c-dark-primary-light": "#1a9cff80",
|
||||
"--c-dark-primary-fade": "#0197fa1a",
|
||||
"--rgb-dark-primary": "0, 151, 253"
|
||||
}
|
||||
],
|
||||
[
|
||||
"#a27be7",
|
||||
{
|
||||
"--theme-color-name": "#a27be7",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#8964cd",
|
||||
"--c-primary-light": "#a27be780",
|
||||
"--c-primary-fade": "#9d76e21a",
|
||||
"--rgb-primary": "162, 123, 231",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#8e69d2",
|
||||
"--c-dark-primary-light": "#a780ec80",
|
||||
"--c-dark-primary-fade": "#a27be71a",
|
||||
"--rgb-dark-primary": "162, 123, 231"
|
||||
}
|
||||
],
|
||||
[
|
||||
"#e65da9",
|
||||
{
|
||||
"--theme-color-name": "#e65da9",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#cb4391",
|
||||
"--c-primary-light": "#e65da980",
|
||||
"--c-primary-fade": "#e158a41a",
|
||||
"--rgb-primary": "230, 93, 169",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#d14896",
|
||||
"--c-dark-primary-light": "#eb62ae80",
|
||||
"--c-dark-primary-fade": "#e65da91a",
|
||||
"--rgb-dark-primary": "230, 93, 169"
|
||||
}
|
||||
],
|
||||
[
|
||||
"#ef6061",
|
||||
{
|
||||
"--theme-color-name": "#ef6061",
|
||||
"--c-primary": "rgb(var(--rgb-primary))",
|
||||
"--c-primary-active": "#d3474c",
|
||||
"--c-primary-light": "#ef606180",
|
||||
"--c-primary-fade": "#e95b5d1a",
|
||||
"--rgb-primary": "239, 96, 97",
|
||||
"--c-dark-primary": "rgb(var(--rgb-dark-primary))",
|
||||
"--c-dark-primary-active": "#d94c50",
|
||||
"--c-dark-primary-light": "#f5656580",
|
||||
"--c-dark-primary-fade": "#ef60611a",
|
||||
"--rgb-dark-primary": "239, 96, 97"
|
||||
}
|
||||
]
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue