Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion radicale_infcloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from http import client
from radicale import httputils
from radicale.web import internal
from importlib.metadata import version

PLUGIN_CONFIG_SCHEMA = {"web": {
"infcloud_config": {
Expand All @@ -38,7 +39,12 @@ def get(self, environ, base_prefix, path, user):
status, headers, answer = super().get(
environ, base_prefix, path, user)
if status == client.OK and path in ("/.web/", "/.web/index.html"):
answer = answer.replace(b"""\
if version("radicale") >="3.2.0":
answer = answer.replace(b"""title="Refresh">Refresh</a>""",
b"""title="Refresh">Refresh</a>
<a class="blue" data-name="infcloud" title="InfCloud" style="float: left;left: 40px;" href="infcloud">InfCloud</a>""")
else:
answer = answer.replace(b"""\
<nav>
<ul>""", b"""\
<nav>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from setuptools import setup

VERSION = "3.1.6"
VERSION = "3.2.2"

package_path = os.path.join(os.path.dirname(__file__), "radicale_infcloud")
web_data = sum((
Expand Down