mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
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 { appRouter } from './router/appRouter';
|
||||||
import browser from "../scripts/browser";
|
import browser from '../scripts/browser';
|
||||||
import dialog from "./dialog/dialog";
|
import dialog from './dialog/dialog';
|
||||||
import globalize from "../scripts/globalize";
|
import globalize from '../scripts/globalize';
|
||||||
|
|
||||||
export default async function (text, title) {
|
export default async function (text, title) {
|
||||||
// Modals seem to be blocked on Web OS and Tizen 2.x
|
// Modals seem to be blocked on Web OS and Tizen 2.x
|
||||||
const canUseNativeAlert = !!(
|
const canUseNativeAlert = !!(
|
||||||
!browser.web0s &&
|
!browser.web0s
|
||||||
!(browser.tizenVersion && browser.tizenVersion < 3) &&
|
&& !(browser.tizenVersion && browser.tizenVersion < 3)
|
||||||
browser.tv &&
|
&& browser.tv
|
||||||
window.alert
|
&& window.alert
|
||||||
);
|
);
|
||||||
|
|
||||||
let options = typeof text === "string" ? { title, text } : text;
|
const options = typeof text === 'string' ? { title, text } : text;
|
||||||
|
|
||||||
await appRouter.ready();
|
await appRouter.ready();
|
||||||
|
|
||||||
if (canUseNativeAlert) {
|
if (canUseNativeAlert) {
|
||||||
alert((options.text || "").replaceAll("<br/>", "\n"));
|
alert((options.text || '').replaceAll('<br/>', '\n'));
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
name: globalize.translate("ButtonGotIt"),
|
name: globalize.translate('ButtonGotIt'),
|
||||||
id: "ok",
|
id: 'ok',
|
||||||
type: "submit",
|
type: 'submit'
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
options.buttons = items;
|
options.buttons = items;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue