From b8e61b4606433ab10ab0f2f49906189c7fb8fa68 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+SamTV12345@users.noreply.github.com> Date: Sun, 24 Aug 2025 22:17:18 +0200 Subject: [PATCH] chore: fixed git determination and fixed no skin css issues (#7089) --- src/node/utils/Settings.ts | 2 +- src/static/skins/no-skin/index.css | 56 ++++++++++++++++++++++++++++++ src/static/skins/no-skin/index.js | 10 ++++++ 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/src/node/utils/Settings.ts b/src/node/utils/Settings.ts index 38aa7dbc5..886350c59 100644 --- a/src/node/utils/Settings.ts +++ b/src/node/utils/Settings.ts @@ -135,7 +135,7 @@ const parseSettings = (settingsFilename: string, isSettings: boolean) => { export const getGitCommit = () => { let version = ''; try { - let rootPath = settings.root; + let rootPath = absolutePaths.findEtherpadRoot(); if (fs.lstatSync(`${rootPath}/.git`).isFile()) { rootPath = fs.readFileSync(`${rootPath}/.git`, 'utf8'); rootPath = rootPath.split(' ').pop()?.trim() ?? ''; diff --git a/src/static/skins/no-skin/index.css b/src/static/skins/no-skin/index.css index 236251d9c..ce666fe87 100644 --- a/src/static/skins/no-skin/index.css +++ b/src/static/skins/no-skin/index.css @@ -6,3 +6,59 @@ #editbar LI {border:1px solid #d5d5d5;} from pad.css */ +#button { + font-size: 90%; + width: 100%; + position: unset; +} + +button[type="submit"], input[type="text"] { + position: unset; +} + +button[type="submit"] { + width: auto; +} + +#label { + display: none; +} + + +#padname { + max-width: 80%; +} + + + +#inner { + max-width: 400px; +} + + +body { + border-top: none; +} + +.body { + display: grid; + place-items: center; + height: 100%; +} + +#wrapper { + width: 100%; + margin-top: 0; + padding: 15px 0 15px 0; +} + + +form { + display: flex; + gap: 10px; + background-color: transparent; + border: none; + height: 4rem; + flex-direction: row; + margin-top: 1rem; +} diff --git a/src/static/skins/no-skin/index.js b/src/static/skins/no-skin/index.js index 633db7267..edbc8979b 100644 --- a/src/static/skins/no-skin/index.js +++ b/src/static/skins/no-skin/index.js @@ -4,4 +4,14 @@ window.customStart = () => { // define your javascript here // jquery is available - except index.js // you can load extra scripts with $.getScript http://api.jquery.com/jQuery.getScript/ + const divHoldingPlaceHolderLabel = document + .querySelector('[data-l10n-id="index.placeholderPadEnter"]'); + + const observer = new MutationObserver(() => { + document.querySelector('#go2Name input') + .setAttribute('placeholder', divHoldingPlaceHolderLabel.textContent); + }); + + observer + .observe(divHoldingPlaceHolderLabel, {childList: true, subtree: true, characterData: true}); };