parent
f5fbad2c20
commit
dbfe12edbf
@ -30,6 +30,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
|
import { isApplePlatform } from "lib/platform";
|
||||||
import StickyBar from "components/StickyBar.svelte";
|
import StickyBar from "components/StickyBar.svelte";
|
||||||
import ButtonToolbar from "components/ButtonToolbar.svelte";
|
import ButtonToolbar from "components/ButtonToolbar.svelte";
|
||||||
import ButtonToolbarItem from "components/ButtonToolbarItem.svelte";
|
import ButtonToolbarItem from "components/ButtonToolbarItem.svelte";
|
||||||
@ -47,7 +48,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||||||
export const colorButtons = {};
|
export const colorButtons = {};
|
||||||
export const templateButtons = {};
|
export const templateButtons = {};
|
||||||
|
|
||||||
export let size = 1.85;
|
export let size = isApplePlatform() ? 1.6 : 2.0;
|
||||||
export let wrap = true;
|
export let wrap = true;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
9
ts/lib/platform.ts
Normal file
9
ts/lib/platform.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// Copyright: Ankitects Pty Ltd and contributors
|
||||||
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
|
export function isApplePlatform(): boolean {
|
||||||
|
return (
|
||||||
|
window.navigator.platform.startsWith("Mac") ||
|
||||||
|
window.navigator.platform.startsWith("iP")
|
||||||
|
);
|
||||||
|
}
|
@ -1,16 +1,11 @@
|
|||||||
// Copyright: Ankitects Pty Ltd and contributors
|
// Copyright: Ankitects Pty Ltd and contributors
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
import * as tr from "./i18n";
|
import * as tr from "./i18n";
|
||||||
|
import { isApplePlatform } from "./platform";
|
||||||
|
|
||||||
export type Modifier = "Control" | "Alt" | "Shift" | "Meta";
|
export type Modifier = "Control" | "Alt" | "Shift" | "Meta";
|
||||||
|
|
||||||
function isApplePlatform(): boolean {
|
|
||||||
return (
|
|
||||||
window.navigator.platform.startsWith("Mac") ||
|
|
||||||
window.navigator.platform.startsWith("iP")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// how modifiers are mapped
|
// how modifiers are mapped
|
||||||
const platformModifiers = isApplePlatform()
|
const platformModifiers = isApplePlatform()
|
||||||
? ["Meta", "Alt", "Shift", "Control"]
|
? ["Meta", "Alt", "Shift", "Control"]
|
||||||
|
Loading…
Reference in New Issue
Block a user