Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Oct 28, 2024
2 parents 1c459b3 + 5b8be1c commit 0c68ddc
Show file tree
Hide file tree
Showing 26 changed files with 1,559 additions and 1,058 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 2.2.6

### Notable enhancements and fixes

- Added option to delete a pad by the creator. This option can be found in the settings menu. When you click on it you get a confirm dialog and after that you have the chance to completely erase the pad.


# 2.2.5

### Notable enhancements and fixes
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,31 @@ following plugins:
that each user's chosen color, display name, comment ownership, etc. is
strongly linked to their account.

### Upgrade Etherpad

Run the following command in your Etherpad folder to upgrade

1. Stop any running Etherpad (manual, systemd ...)
2. Get present version
```sh
git -P tag --contains
```
3. List versions available
```sh
git -P tag --list "v*" --merged
```
4. Select the version
```sh
git checkout v2.2.5
git switch -c v2.2.5
```
5. Upgrade Etherpad
```sh
./bin/run.sh
```
6. Stop with [CTRL-C]
7. Restart your Etherpad service

## Next Steps

### Tweak the settings
Expand Down
44 changes: 22 additions & 22 deletions admin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "admin",
"private": true,
"version": "2.2.5",
"version": "2.2.6",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -11,32 +11,32 @@
"preview": "vite preview"
},
"dependencies": {
"@radix-ui/react-switch": "^1.1.0"
"@radix-ui/react-switch": "^1.1.1"
},
"devDependencies": {
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-toast": "^1.2.1",
"@types/react": "^18.3.8",
"@types/react-dom": "^18.2.25",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.10.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.12",
"i18next": "^23.15.1",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-toast": "^1.2.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"@vitejs/plugin-react-swc": "^3.7.1",
"eslint": "^9.13.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.13",
"i18next": "^23.16.2",
"i18next-browser-languagedetector": "^8.0.0",
"lucide-react": "^0.441.0",
"lucide-react": "^0.453.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.53.0",
"react-i18next": "^15.0.2",
"react-router-dom": "^6.26.2",
"socket.io-client": "^4.7.5",
"typescript": "^5.6.2",
"vite": "^5.4.7",
"vite-plugin-static-copy": "^1.0.6",
"react-hook-form": "^7.53.1",
"react-i18next": "^15.1.0",
"react-router-dom": "^6.27.0",
"socket.io-client": "^4.8.0",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vite-plugin-static-copy": "^2.0.0",
"vite-plugin-svgr": "^4.2.0",
"zustand": "^4.5.5"
"zustand": "^5.0.0"
}
}
4 changes: 3 additions & 1 deletion admin/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ export const App = () => {
<h1>Etherpad</h1>
</span>
<ul onClick={()=>{
setSidebarOpen(false)
if (window.innerWidth < 768) {
setSidebarOpen(false)
}
}}>
<li><NavLink to="/plugins"><Cable/><Trans i18nKey="admin_plugins"/></NavLink></li>
<li><NavLink to={"/settings"}><Wrench/><Trans i18nKey="admin_settings"/></NavLink></li>
Expand Down
31 changes: 16 additions & 15 deletions admin/src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import {InstalledPlugin, PluginDef, SearchParams} from "./Plugin.ts";
import {useDebounce} from "../utils/useDebounce.ts";
import {Trans, useTranslation} from "react-i18next";
import {SearchField} from "../components/SearchField.tsx";
import {Download, Trash} from "lucide-react";
import {ArrowUpFromDot, Download, Trash} from "lucide-react";
import {IconButton} from "../components/IconButton.tsx";
import {determineSorting} from "../utils/sorting.ts";


export const HomePage = () => {
const pluginsSocket = useStore(state=>state.pluginsSocket)
const [plugins,setPlugins] = useState<PluginDef[]>([])
const [installedPlugins, setInstalledPlugins] = useState<InstalledPlugin[]>([])
const installedPlugins = useStore(state=>state.installedPlugins)
const setInstalledPlugins = useStore(state=>state.setInstalledPlugins)
const [searchParams, setSearchParams] = useState<SearchParams>({
offset: 0,
limit: 99999,
Expand Down Expand Up @@ -49,7 +50,7 @@ export const HomePage = () => {
}, [plugins, searchParams])

const sortedInstalledPlugins = useMemo(()=>{
return installedPlugins.sort((a, b)=>{
return useStore.getState().installedPlugins.sort((a, b)=>{

if(a.name < b.name){
return -1
Expand Down Expand Up @@ -78,17 +79,16 @@ export const HomePage = () => {
})

pluginsSocket.on('results:updatable', (data) => {
data.updatable.forEach((pluginName: string) => {
setInstalledPlugins(installedPlugins.map(plugin => {
if (plugin.name === pluginName) {
return {
...plugin,
updatable: true
}
}
return plugin
}))
})
const newInstalledPlugins = useStore.getState().installedPlugins.map(plugin => {
if (data.updatable.includes(plugin.name)) {
return {
...plugin,
updatable: true
}
}
return plugin
})
setInstalledPlugins(newInstalledPlugins)
})

pluginsSocket.on('finished:install', () => {
Expand Down Expand Up @@ -159,6 +159,7 @@ export const HomePage = () => {
})
}, 500, [searchTerm])


return <div>
<h1><Trans i18nKey="admin_plugins"/></h1>

Expand All @@ -180,7 +181,7 @@ export const HomePage = () => {
<td>
{
plugin.updatable ?
<button onClick={() => installPlugin(plugin.name)}>Update</button>
<IconButton onClick={() => installPlugin(plugin.name)} icon={<ArrowUpFromDot/>} title="Update"></IconButton>
: <IconButton disabled={plugin.name == "ep_etherpad-lite"} icon={<Trash/>} title={<Trans i18nKey="admin_plugins.installed_uninstall.value"/>} onClick={() => uninstallPlugin(plugin.name)}/>
}
</td>
Expand Down
9 changes: 7 additions & 2 deletions admin/src/store/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {create} from "zustand";
import {Socket} from "socket.io-client";
import {PadSearchResult} from "../utils/PadSearch.ts";
import {InstalledPlugin} from "../pages/Plugin.ts";

type ToastState = {
description?:string,
Expand All @@ -22,7 +23,9 @@ type StoreState = {
toastState: ToastState,
setToastState: (val: ToastState)=>void,
pads: PadSearchResult|undefined,
setPads: (pads: PadSearchResult)=>void
setPads: (pads: PadSearchResult)=>void,
installedPlugins: InstalledPlugin[],
setInstalledPlugins: (plugins: InstalledPlugin[])=>void
}


Expand All @@ -43,5 +46,7 @@ export const useStore = create<StoreState>()((set) => ({
success: false
},
pads: undefined,
setPads: (pads)=>set({pads})
setPads: (pads)=>set({pads}),
installedPlugins: [],
setInstalledPlugins: (plugins)=>set({installedPlugins: plugins})
}));
8 changes: 4 additions & 4 deletions bin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bin",
"version": "2.2.5",
"version": "2.2.6",
"description": "",
"main": "checkAllPads.js",
"directories": {
Expand All @@ -12,12 +12,12 @@
"log4js": "^6.9.1",
"semver": "^7.6.3",
"tsx": "^4.19.1",
"ueberdb2": "^5.0.2"
"ueberdb2": "^5.0.6"
},
"devDependencies": {
"@types/node": "^22.5.5",
"@types/node": "^22.7.9",
"@types/semver": "^7.5.8",
"typescript": "^5.6.2"
"typescript": "^5.6.3"
},
"scripts": {
"makeDocs": "node --import tsx make_docs.ts",
Expand Down
2 changes: 1 addition & 1 deletion doc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"devDependencies": {
"vitepress": "^1.3.4"
"vitepress": "^1.4.1"
},
"scripts": {
"docs:dev": "vitepress dev",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"type": "git",
"url": "https://github.com/ether/etherpad-lite.git"
},
"version": "2.2.5",
"version": "2.2.6",
"license": "Apache-2.0"
}
Loading

0 comments on commit 0c68ddc

Please sign in to comment.