mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 07:35:05 -04:00
Merge c7c28d47c3
into 509d4a3397
This commit is contained in:
commit
f87e04815b
11 changed files with 40 additions and 4 deletions
|
@ -643,7 +643,7 @@
|
||||||
"right": [
|
"right": [
|
||||||
["importexport", "timeslider", "savedrevision"],
|
["importexport", "timeslider", "savedrevision"],
|
||||||
["settings", "embed"],
|
["settings", "embed"],
|
||||||
["showusers"]
|
["showusers","exit"]
|
||||||
],
|
],
|
||||||
"timeslider": [
|
"timeslider": [
|
||||||
["timeslider_export", "timeslider_returnToPad"]
|
["timeslider_export", "timeslider_returnToPad"]
|
||||||
|
|
|
@ -642,7 +642,7 @@
|
||||||
"right": [
|
"right": [
|
||||||
["importexport", "timeslider", "savedrevision"],
|
["importexport", "timeslider", "savedrevision"],
|
||||||
["settings", "embed"],
|
["settings", "embed"],
|
||||||
["showusers"]
|
["showusers"],["exit"]
|
||||||
],
|
],
|
||||||
"timeslider": [
|
"timeslider": [
|
||||||
["timeslider_export", "timeslider_returnToPad"]
|
["timeslider_export", "timeslider_returnToPad"]
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
"pad.toolbar.settings.title": "Settings",
|
"pad.toolbar.settings.title": "Settings",
|
||||||
"pad.toolbar.embed.title": "Share and Embed this pad",
|
"pad.toolbar.embed.title": "Share and Embed this pad",
|
||||||
"pad.toolbar.showusers.title": "Show the users on this pad",
|
"pad.toolbar.showusers.title": "Show the users on this pad",
|
||||||
|
"pad.toolbar.help.title": "Exit to Home",
|
||||||
|
|
||||||
"pad.colorpicker.save": "Save",
|
"pad.colorpicker.save": "Save",
|
||||||
"pad.colorpicker.cancel": "Cancel",
|
"pad.colorpicker.cancel": "Cancel",
|
||||||
|
|
|
@ -246,7 +246,7 @@ exports.toolbar = {
|
||||||
right: [
|
right: [
|
||||||
['importexport', 'timeslider', 'savedrevision'],
|
['importexport', 'timeslider', 'savedrevision'],
|
||||||
['settings', 'embed'],
|
['settings', 'embed'],
|
||||||
['showusers'],
|
['showusers','exit'],
|
||||||
],
|
],
|
||||||
timeslider: [
|
timeslider: [
|
||||||
['timeslider_export', 'timeslider_settings', 'timeslider_returnToPad'],
|
['timeslider_export', 'timeslider_settings', 'timeslider_returnToPad'],
|
||||||
|
|
|
@ -258,6 +258,11 @@ module.exports = {
|
||||||
localizationId: 'timeslider.toolbar.returnbutton',
|
localizationId: 'timeslider.toolbar.returnbutton',
|
||||||
class: 'buttontext',
|
class: 'buttontext',
|
||||||
},
|
},
|
||||||
|
exit:{
|
||||||
|
command: 'exit',
|
||||||
|
localizationId: 'pad.toolbar.exit.title',
|
||||||
|
class: 'buttonicon buttonicon-exit',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
registerButton(buttonName: string, buttonInfo: any) {
|
registerButton(buttonName: string, buttonInfo: any) {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
@import url("pad/gritter.css");
|
@import url("pad/gritter.css");
|
||||||
@import url("pad/loadingbox.css");
|
@import url("pad/loadingbox.css");
|
||||||
@import url("pad/form.css");
|
@import url("pad/form.css");
|
||||||
|
@import url("pad/exit-button.css");
|
||||||
|
|
||||||
html {
|
html {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
8
src/static/css/pad/exit-button.css
Normal file
8
src/static/css/pad/exit-button.css
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
.buttonicon-exit:before {
|
||||||
|
content: "\2715";
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#exit-button {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
|
@ -381,6 +381,10 @@ exports.padeditbar = new class {
|
||||||
$('.exportlink').first().trigger('focus');
|
$('.exportlink').first().trigger('focus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.registerCommand('exit', () => {
|
||||||
|
console.log('Exit button clicked');
|
||||||
|
window.location.href = '/';
|
||||||
|
});
|
||||||
|
|
||||||
this.registerCommand('showusers', () => {
|
this.registerCommand('showusers', () => {
|
||||||
this.toggleDropDown('users');
|
this.toggleDropDown('users');
|
||||||
|
@ -478,5 +482,8 @@ exports.padeditbar = new class {
|
||||||
.substring(0, document.location.href.lastIndexOf('/'));
|
.substring(0, document.location.href.lastIndexOf('/'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
|
@ -217,3 +217,7 @@ exports.focusOnLine = (ace) => {
|
||||||
}
|
}
|
||||||
// End of setSelection / set Y position of editor
|
// End of setSelection / set Y position of editor
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// toolbar.registerCommand('exit', () => {
|
||||||
|
// window.location.href = '/';
|
||||||
|
// });
|
||||||
|
|
|
@ -25,7 +25,9 @@ export const setUserName = async (page: Page, userName: string) => {
|
||||||
await page.click("input[data-l10n-id='pad.userlist.entername']");
|
await page.click("input[data-l10n-id='pad.userlist.entername']");
|
||||||
await page.keyboard.type(userName);
|
await page.keyboard.type(userName);
|
||||||
}
|
}
|
||||||
|
export const exitPad = async (page: Page) => {
|
||||||
|
await page.locator("button[data-l10n-id='pad.toolbar.exit.title']").click();
|
||||||
|
}
|
||||||
|
|
||||||
export const showChat = async (page: Page) => {
|
export const showChat = async (page: Page) => {
|
||||||
const chatIcon = page.locator("#chaticon")
|
const chatIcon = page.locator("#chaticon")
|
||||||
|
|
|
@ -85,6 +85,14 @@ helper.toggleUserList = async () => {
|
||||||
await helper.waitForPromise(() => !isVisible);
|
await helper.waitForPromise(() => !isVisible);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
helper.exitButton = () => helper.padChrome$("button[data-l10n-id='pad.toolbar.exit.title']");
|
||||||
|
|
||||||
|
helper.exitPad = async () => {
|
||||||
|
const button = helper.exitButton();
|
||||||
|
button.trigger('click');
|
||||||
|
await helper.waitForPromise(() => window.location.pathname === '/');
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the user name input field
|
* Gets the user name input field
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue