1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Merge branch 'dev' of github.com:laurent22/joplin into dev

This commit is contained in:
Laurent Cozic 2021-07-22 17:30:50 +01:00
commit 2b378880ce
10 changed files with 459 additions and 504 deletions

View File

@ -42,6 +42,21 @@ joplin.plugins.register({
const result3 = await dialogs.open(handle3); const result3 = await dialogs.open(handle3);
console.info('Got result: ' + JSON.stringify(result3)); console.info('Got result: ' + JSON.stringify(result3));
const handle4 = await dialogs.create('myDialog4');
await dialogs.setHtml(handle4, `
<h1>This dialog tests dynamic sizing</h1>
<h3>Resize the window and the dialog should resize accordingly</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
</p>
`);
await (dialogs as any).fitToContent(handle4, false);
await dialogs.open(handle4);
}, },
}); });

View File

@ -779,6 +779,7 @@ class MainScreenComponent extends React.Component<Props, State> {
scripts={view.scripts} scripts={view.scripts}
pluginId={plugin.id} pluginId={plugin.id}
buttons={view.buttons} buttons={view.buttons}
fitToContent={view.fitToContent}
/>); />);
} }

View File

@ -31,8 +31,8 @@ export interface Props {
const StyledFrame = styled.iframe` const StyledFrame = styled.iframe`
padding: 0; padding: 0;
margin: 0; margin: 0;
width: ${(props: any) => props.fitToContent ? `${props.width}px` : '100%'}; width: ${(props: any) => props.fitToContent ? `${props.width}px` : '90vw'};
height: ${(props: any) => props.fitToContent ? `${props.height}px` : '100%'}; height: ${(props: any) => props.fitToContent ? `${props.height}px` : '80vh'};
border: none; border: none;
border-bottom: ${(props: Props) => props.borderBottom ? `1px solid ${props.theme.dividerColor}` : 'none'}; border-bottom: ${(props: Props) => props.borderBottom ? `1px solid ${props.theme.dividerColor}` : 'none'};
`; `;

View File

@ -9,6 +9,7 @@ const styled = require('styled-components').default;
interface Props extends UserWebviewProps { interface Props extends UserWebviewProps {
buttons: ButtonSpec[]; buttons: ButtonSpec[];
fitToContent: boolean;
} }
const StyledRoot = styled.div` const StyledRoot = styled.div`
@ -113,7 +114,7 @@ export default function UserWebviewDialog(props: Props) {
viewId={props.viewId} viewId={props.viewId}
themeId={props.themeId} themeId={props.themeId}
borderBottom={false} borderBottom={false}
fitToContent={true} fitToContent={props.fitToContent}
onSubmit={onSubmit} onSubmit={onSubmit}
onDismiss={onDismiss} onDismiss={onDismiss}
onReady={onReady} onReady={onReady}

View File

@ -58,6 +58,7 @@ export default class WebviewController extends ViewController {
scripts: [], scripts: [],
opened: false, opened: false,
buttons: null, buttons: null,
fitToContent: true,
}, },
}); });
} }
@ -173,4 +174,11 @@ export default class WebviewController extends ViewController {
this.setStoreProp('buttons', buttons); this.setStoreProp('buttons', buttons);
} }
public get fitToContent(): boolean {
return this.storeView.fitToContent;
}
public set fitToContent(fitToContent: boolean) {
this.setStoreProp('fitToContent', fitToContent);
}
} }

View File

@ -98,4 +98,13 @@ export default class JoplinViewsDialogs {
return this.controller(handle).open(); return this.controller(handle).open();
} }
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog stretches to fill the application
* window.
* @default true
*/
public async setFitToContent(handle: ViewHandle, status: boolean) {
return this.controller(handle).fitToContent = status;
}
} }

View File

@ -7,14 +7,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Joplin 1.0.0\n" "Project-Id-Version: Joplin 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"Last-Translator: Szőke Sándor <mail@szokesandor.hu>\n" "Last-Translator: Magyari Balázs <balmag@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: hu_HU\n" "Language: hu_HU\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.3\n" "X-Generator: Poedit 3.0\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
#: packages/app-desktop/bridge.js:106 packages/app-desktop/bridge.js:110 #: packages/app-desktop/bridge.js:106 packages/app-desktop/bridge.js:110
#: packages/app-desktop/bridge.js:126 packages/app-desktop/bridge.js:134 #: packages/app-desktop/bridge.js:126 packages/app-desktop/bridge.js:134
@ -234,9 +236,9 @@ msgstr "Elemek titkosítása: %d/%d"
#: packages/app-desktop/gui/Sidebar/Sidebar.js:507 #: packages/app-desktop/gui/Sidebar/Sidebar.js:507
#: packages/app-mobile/components/side-menu-content.js:330 #: packages/app-mobile/components/side-menu-content.js:330
#, fuzzy, javascript-format #, javascript-format
msgid "Fetching resources: %d/%d" msgid "Fetching resources: %d/%d"
msgstr "Fetched erőforrások: %d/%d." msgstr "Erőforrások lekérése: %d/%d."
#: packages/app-desktop/gui/Sidebar/commands/focusElementSideBar.js:17 #: packages/app-desktop/gui/Sidebar/commands/focusElementSideBar.js:17
msgid "Sidebar" msgid "Sidebar"
@ -265,12 +267,10 @@ msgid "Retry"
msgstr "Ismét" msgstr "Ismét"
#: packages/app-desktop/gui/StatusScreen/StatusScreen.js:137 #: packages/app-desktop/gui/StatusScreen/StatusScreen.js:137
#, fuzzy
msgid "Advanced tools" msgid "Advanced tools"
msgstr "Haladó beállítások" msgstr "Haladó beállítások"
#: packages/app-desktop/gui/StatusScreen/StatusScreen.js:139 #: packages/app-desktop/gui/StatusScreen/StatusScreen.js:139
#, fuzzy
msgid "Export debug report" msgid "Export debug report"
msgstr "Debug jelentés exportálása" msgstr "Debug jelentés exportálása"
@ -387,7 +387,7 @@ msgid ""
"switch to %s to edit the note." "switch to %s to edit the note."
msgstr "" msgstr ""
"Kérem várjon minden csatolmány letöltésére és dekódolására. Átválthat %s-re " "Kérem várjon minden csatolmány letöltésére és dekódolására. Átválthat %s-re "
"a jegyzet szerkesztéséhez. " "a jegyzet szerkesztéséhez."
#: packages/app-desktop/gui/NoteEditor/utils/contextMenu.js:59 #: packages/app-desktop/gui/NoteEditor/utils/contextMenu.js:59
msgid "There was an error downloading this attachment:" msgid "There was an error downloading this attachment:"
@ -793,7 +793,7 @@ msgstr "Jelszó beállítása"
msgid "Use the arrows to move the layout items. Press \"Escape\" to exit." msgid "Use the arrows to move the layout items. Press \"Escape\" to exit."
msgstr "" msgstr ""
"Használja a nyilakat az elrendezés elemek mozgatásához. Majd nyomja le az " "Használja a nyilakat az elrendezés elemek mozgatásához. Majd nyomja le az "
"\"Escape\"-et a kilépéshez. " "\"Escape\"-et a kilépéshez."
#: packages/app-desktop/gui/MainScreen/commands/showNoteContentProperties.js:18 #: packages/app-desktop/gui/MainScreen/commands/showNoteContentProperties.js:18
msgid "Statistics..." msgid "Statistics..."
@ -917,7 +917,7 @@ msgid ""
"To allow Joplin to synchronise with Dropbox, please follow the steps below:" "To allow Joplin to synchronise with Dropbox, please follow the steps below:"
msgstr "" msgstr ""
"Hogy a Joplin tudjon szinkronizálni Dropbox-al, kérem kövesse a következő " "Hogy a Joplin tudjon szinkronizálni Dropbox-al, kérem kövesse a következő "
"lépéseket." "lépéseket:"
#: packages/app-desktop/gui/DropboxLoginScreen.js:30 #: packages/app-desktop/gui/DropboxLoginScreen.js:30
#: packages/app-mobile/components/screens/dropbox-login.js:59 #: packages/app-mobile/components/screens/dropbox-login.js:59
@ -1868,7 +1868,7 @@ msgstr "Engedély a kamera használatához"
#: packages/app-mobile/components/CameraView.js:159 #: packages/app-mobile/components/CameraView.js:159
msgid "Your permission to use your camera is required." msgid "Your permission to use your camera is required."
msgstr "A kamera használati engedélyre szükség van. " msgstr "A kamera használatához engedélyre van szükség."
#: packages/app-mobile/components/screen-header.js:185 #: packages/app-mobile/components/screen-header.js:185
msgid "Delete these notes?" msgid "Delete these notes?"
@ -2265,11 +2265,11 @@ msgstr "Minden potenciális port használva van - kérem jelentse a hibát itt:
#: packages/lib/onedrive-api-node-utils.js:86 #: packages/lib/onedrive-api-node-utils.js:86
msgid "" msgid ""
"The application has been authorised - you may now close this browser tab." "The application has been authorised - you may now close this browser tab."
msgstr "Az alkalmazás hitelesítve - már becsukhatja a böngésző ablakot. " msgstr "Az alkalmazás hitelesítve - már becsukhatja a böngésző ablakot."
#: packages/lib/onedrive-api-node-utils.js:88 #: packages/lib/onedrive-api-node-utils.js:88
msgid "The application has been successfully authorised." msgid "The application has been successfully authorised."
msgstr "Az alkalmazás sikeresen hitelesítve!" msgstr "Az alkalmazás sikeresen hitelesítve."
#: packages/lib/onedrive-api-node-utils.js:116 #: packages/lib/onedrive-api-node-utils.js:116
msgid "" msgid ""
@ -2303,7 +2303,7 @@ msgstr "cím"
#: packages/lib/models/Folder.js:39 packages/lib/models/Note.js:37 #: packages/lib/models/Folder.js:39 packages/lib/models/Note.js:37
msgid "updated date" msgid "updated date"
msgstr "Frissítési dátum" msgstr "frissítési dátum"
#: packages/lib/models/Folder.js:103 #: packages/lib/models/Folder.js:103
msgid "Conflicts" msgid "Conflicts"
@ -4029,7 +4029,7 @@ msgstr "Több mint egy elem egyezik ezzel \"%s\". Kérem szűkítse a lekérdez
#: packages/app-cli/app/app.js:93 #: packages/app-cli/app/app.js:93
msgid "No notebook selected." msgid "No notebook selected."
msgstr "Nincs kiválasztva jegyzetfüzet!" msgstr "Nincs kiválasztva jegyzetfüzet."
#: packages/app-cli/app/app.js:99 #: packages/app-cli/app/app.js:99
msgid "No notebook has been specified." msgid "No notebook has been specified."

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,6 @@
"version": "1.0.32", "version": "1.0.32",
"author": "Dom Christie", "author": "Dom Christie",
"main": "lib/turndown-plugin-gfm.cjs.js", "main": "lib/turndown-plugin-gfm.cjs.js",
"module": "lib/turndown-plugin-gfm.es.js",
"jsnext:main": "lib/turndown-plugin-gfm.es.js",
"devDependencies": { "devDependencies": {
"browserify": "^14.5.0", "browserify": "^14.5.0",
"rollup": "^0.50.0", "rollup": "^0.50.0",

View File

@ -4,8 +4,6 @@
"version": "4.0.50", "version": "4.0.50",
"author": "Dom Christie", "author": "Dom Christie",
"main": "lib/turndown.cjs.js", "main": "lib/turndown.cjs.js",
"module": "lib/turndown.es.js",
"jsnext:main": "lib/turndown.es.js",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },