style: use singlequote for strings
This commit is contained in:
parent
0a878bfbcd
commit
6664b6ec62
1 changed files with 14 additions and 14 deletions
|
@ -1,33 +1,33 @@
|
|||
import { appRouter } from "./router/appRouter";
|
||||
import browser from "../scripts/browser";
|
||||
import dialog from "./dialog/dialog";
|
||||
import globalize from "../scripts/globalize";
|
||||
import { appRouter } from './router/appRouter';
|
||||
import browser from '../scripts/browser';
|
||||
import dialog from './dialog/dialog';
|
||||
import globalize from '../scripts/globalize';
|
||||
|
||||
export default async function (text, title) {
|
||||
// Modals seem to be blocked on Web OS and Tizen 2.x
|
||||
const canUseNativeAlert = !!(
|
||||
!browser.web0s &&
|
||||
!(browser.tizenVersion && browser.tizenVersion < 3) &&
|
||||
browser.tv &&
|
||||
window.alert
|
||||
!browser.web0s
|
||||
&& !(browser.tizenVersion && browser.tizenVersion < 3)
|
||||
&& browser.tv
|
||||
&& window.alert
|
||||
);
|
||||
|
||||
let options = typeof text === "string" ? { title, text } : text;
|
||||
const options = typeof text === 'string' ? { title, text } : text;
|
||||
|
||||
await appRouter.ready();
|
||||
|
||||
if (canUseNativeAlert) {
|
||||
alert((options.text || "").replaceAll("<br/>", "\n"));
|
||||
alert((options.text || '').replaceAll('<br/>', '\n'));
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const items = [
|
||||
{
|
||||
name: globalize.translate("ButtonGotIt"),
|
||||
id: "ok",
|
||||
type: "submit",
|
||||
},
|
||||
name: globalize.translate('ButtonGotIt'),
|
||||
id: 'ok',
|
||||
type: 'submit'
|
||||
}
|
||||
];
|
||||
|
||||
options.buttons = items;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue