Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5, new code format rules for frontend, some general overdue refactoring #762

Merged
merged 28 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
738d481
wip svelte 5 migration
IRHM Jan 3, 2025
a40f90a
migrate more stuff to svelte 5 in a minimal fashion
IRHM Jan 5, 2025
2cfe1d1
format all code with new style (printWidth=80, useTabs=true, trailing…
IRHM Jan 5, 2025
ead70c9
Fix poster Rating/Status styling
IRHM Jan 6, 2025
21da15e
deps: Remove tslib
IRHM Jan 6, 2025
4f0ef3d
fix some stuff
IRHM Jan 9, 2025
c0b9074
PosterRating: Fix button fonts
IRHM Jan 11, 2025
2b5ce07
person: refactor and fix infinite loop in new/old sorts
IRHM Jan 11, 2025
c862bd6
store: Add debug logging to saver/rehydrator
IRHM Jan 12, 2025
c6a66e9
Run startStoreSaver outside onMount in main layout
IRHM Jan 12, 2025
64bd329
WatchedList: Fix filtering
IRHM Jan 12, 2025
aa71cdd
SortMenu: Fix style & not updating store when sort changed
IRHM Jan 12, 2025
5ea8f59
Activity: Fix styling, remove isActivityEditorVisible and use clicked…
IRHM Jan 12, 2025
b91e4f0
WatchedList: Fix list not re-sorting when item updated via poster
IRHM Jan 12, 2025
9106954
login: Fix state by actually using state rune
IRHM Jan 12, 2025
e976623
Create hooks.client.ts: Use `init` hook for logging app version
IRHM Jan 13, 2025
897bbf5
Store: Refactor to use get/set for all properties
IRHM Jan 13, 2025
00f645e
Store: Use normal store for logging activeSort restore
IRHM Jan 13, 2025
b59f8a2
profile: toFormattedTimeLong: Return "0 hours" as default
IRHM Jan 13, 2025
10dcd6d
plain layout: Remove '/' link from watcharr text in nav
IRHM Jan 13, 2025
ea8e435
FilterMenu: Re-set activeFilters after modifying so setter saves new …
IRHM Jan 13, 2025
d93fbb0
prettier: ignore .vscode folder
IRHM Jan 13, 2025
aad65a2
login: finish migration to svelte 5
IRHM Jan 13, 2025
0a22484
Remove now-unknown svelte-ignore comment
IRHM Jan 13, 2025
bd2e645
EditUserModal: Fix usage and reactivity
IRHM Jan 13, 2025
aff86db
PosterRating: Fix styling for thumb rating system
IRHM Jan 13, 2025
2769919
Refactor menus to use new component
IRHM Jan 17, 2025
ea86451
fix linting issues
IRHM Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
extends: ["plugin:svelte/recommended"],
plugins: ["@typescript-eslint"],
ignorePatterns: ["*.cjs", "*.config.js"],
overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser"
}
}
],
parserOptions: {
project: "./tsconfig.json",
extraFileExtensions: [".svelte"],
sourceType: "module",
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: false
}
root: true,
parser: "@typescript-eslint/parser",
extends: ["plugin:svelte/recommended"],
plugins: ["@typescript-eslint"],
ignorePatterns: ["*.cjs", "*.config.js"],
overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
],
parserOptions: {
project: "./tsconfig.json",
extraFileExtensions: [".svelte"],
sourceType: "module",
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: false,
},
};
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ node_modules
.env
.env.*
!.env.example
/.vscode

doc/.docusaurus/
doc/build/

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
Expand Down
32 changes: 16 additions & 16 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 100,
"useTabs": false,
"trailingComma": "none",
"arrowParens": "always",
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 80,
"useTabs": true,
"trailingComma": "all",
"arrowParens": "always",
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
26 changes: 13 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}"
}
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.insertSpaces": false
}
2 changes: 1 addition & 1 deletion doc/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")]
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
12 changes: 6 additions & 6 deletions doc/docs/importing/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"label": "Importing",
"position": 3,
"link": {
"type": "generated-index",
"description": "Guides for importing your data from other services."
}
"label": "Importing",
"position": 3,
"link": {
"type": "generated-index",
"description": "Guides for importing your data from other services."
}
}
12 changes: 6 additions & 6 deletions doc/docs/installation/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"label": "Installation",
"position": 2,
"link": {
"type": "generated-index",
"description": "Choose how you would like to install Watcharr."
}
"label": "Installation",
"position": 2,
"link": {
"type": "generated-index",
"description": "Choose how you would like to install Watcharr."
}
}
12 changes: 6 additions & 6 deletions doc/docs/server_config/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"label": "Server Configuration",
"position": 2,
"link": {
"type": "generated-index",
"description": "Learn how to configure your server."
}
"label": "Server Configuration",
"position": 2,
"link": {
"type": "generated-index",
"description": "Learn how to configure your server."
}
}
12 changes: 6 additions & 6 deletions doc/docs/usage/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"label": "Usage",
"position": 3,
"link": {
"type": "generated-index",
"description": "Hopefully Watcharr is easy enough to get started with and use, but incase you are stuck, one of these usage guides may help."
}
"label": "Usage",
"position": 3,
"link": {
"type": "generated-index",
"description": "Hopefully Watcharr is easy enough to get started with and use, but incase you are stuck, one of these usage guides may help."
}
}
182 changes: 91 additions & 91 deletions doc/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,104 +7,104 @@ const darkTheme = themes.dracula;

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Watcharr Docs",
tagline:
"Open source, self-hostable watched list for all your content with user authentication, modern and clean UI and a very simple setup. ",
favicon: "img/favicon.png",
title: "Watcharr Docs",
tagline:
"Open source, self-hostable watched list for all your content with user authentication, modern and clean UI and a very simple setup. ",
favicon: "img/favicon.png",

// Set the production url of your site here
url: "https://watcharr.app",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
// Set the production url of your site here
url: "https://watcharr.app",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "sbondCo", // Usually your GitHub org/user name.
projectName: "Watcharr", // Usually your repo name.
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "sbondCo", // Usually your GitHub org/user name.
projectName: "Watcharr", // Usually your repo name.

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

trailingSlash: false,
trailingSlash: false,

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"]
},
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"],
},

presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "/~https://github.com/sbondCo/Watcharr/tree/dev/doc"
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "/~https://github.com/sbondCo/Watcharr/tree/dev/doc"
},
theme: {
customCss: [
"./node_modules/viewerjs/dist/viewer.css",
require.resolve("./src/css/custom.css")
]
}
})
]
],
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "/~https://github.com/sbondCo/Watcharr/tree/dev/doc",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "/~https://github.com/sbondCo/Watcharr/tree/dev/doc",
},
theme: {
customCss: [
"./node_modules/viewerjs/dist/viewer.css",
require.resolve("./src/css/custom.css"),
],
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "img/social-card.png",
navbar: {
title: "Watcharr",
logo: {
alt: "Watcharr Logo",
src: "img/favicon.png"
},
items: [
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Docs"
},
{
type: "docsVersionDropdown"
},
{
href: "https://beta.watcharr.app",
label: "Demo",
position: "right"
},
{
href: "/~https://github.com/sbondCo/Watcharr",
label: "GitHub",
position: "right"
}
]
},
prism: {
theme: lightTheme,
darkTheme: darkTheme
},
colorMode: {
defaultMode: "light",
// Dark theme currently disabled.. no time to fix the icons etc.
disableSwitch: true
}
})
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "img/social-card.png",
navbar: {
title: "Watcharr",
logo: {
alt: "Watcharr Logo",
src: "img/favicon.png",
},
items: [
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Docs",
},
{
type: "docsVersionDropdown",
},
{
href: "https://beta.watcharr.app",
label: "Demo",
position: "right",
},
{
href: "/~https://github.com/sbondCo/Watcharr",
label: "GitHub",
position: "right",
},
],
},
prism: {
theme: lightTheme,
darkTheme: darkTheme,
},
colorMode: {
defaultMode: "light",
// Dark theme currently disabled.. no time to fix the icons etc.
disableSwitch: true,
},
}),
};

module.exports = config;
Loading
Loading