@qtoggle/qui 1.16.3 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js/window.js CHANGED
@@ -110,6 +110,21 @@ export function enterFullScreen() {
110
110
  document.documentElement.requestFullscreen()
111
111
  }
112
112
 
113
+ /**
114
+ * Exit from full-screen mode.
115
+ * @alias qui.window.exitFullScreen
116
+ */
117
+ export function exitFullScreen() {
118
+ if (document.exitFullscreen) {
119
+ if (appActive) {
120
+ document.exitFullscreen()
121
+ }
122
+ }
123
+ else {
124
+ logger.warn('exiting full-screen mode not supported by browser')
125
+ }
126
+ }
127
+
113
128
  /**
114
129
  * Tell whether the browser window is in full-screen mode or not.
115
130
  * @alias qui.window.isFullScreen
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qtoggle/qui",
3
3
  "description": "A JavaScript UI library with batteries included.",
4
- "version": "1.16.3",
4
+ "version": "1.17.0",
5
5
  "author": {
6
6
  "name": "Calin Crisan",
7
7
  "email": "ccrisan@gmail.com"
package/qui/__init__.py CHANGED
@@ -12,8 +12,10 @@ logger = logging.getLogger(__name__)
12
12
 
13
13
 
14
14
  def configure(
15
+ *,
15
16
  name: str,
16
17
  display_name: str,
18
+ display_short_name: Optional[str] = None,
17
19
  description: str,
18
20
  version: str,
19
21
  debug: bool,
@@ -29,7 +31,8 @@ def configure(
29
31
  """Configure QUI on the server side.
30
32
 
31
33
  :param name: project name, normally lowercase, no spaces, e.g. ``my-project``
32
- :param display_name: project display name, e.g. ``My Project``
34
+ :param display_name: project display name, e.g. ``My Nice And Shiny Project``
35
+ :param display_short_name: optional project display short name, e.g. ``My Project``
33
36
  :param description: project description, e.g. ``A project that does stuff``
34
37
  :param version: project version
35
38
  :param debug: indicates whether frontend runs in debug mode or not
@@ -52,6 +55,9 @@ def configure(
52
55
  settings.version = version
53
56
  settings.debug = debug
54
57
 
58
+ if display_short_name is not None:
59
+ settings.display_short_name = display_short_name
60
+
55
61
  if theme_color is not None:
56
62
  settings.theme_color = theme_color
57
63
 
package/qui/settings.py CHANGED
@@ -20,6 +20,7 @@ logger = logging.getLogger(__name__)
20
20
 
21
21
  name: str = ''
22
22
  display_name: str = ''
23
+ display_short_name: str = ''
23
24
  description: str = ''
24
25
  version: str = ''
25
26
  debug: bool = False
@@ -45,6 +46,7 @@ def make_context(request: HTTPRequest) -> dict[str, Any]:
45
46
  return {
46
47
  'name': name,
47
48
  'display_name': display_name,
49
+ 'display_short_name': display_short_name,
48
50
  'description': description,
49
51
  'version': version,
50
52
  'debug': debug,
package/setup.py CHANGED
@@ -8,7 +8,7 @@ except ImportError:
8
8
 
9
9
  setup(
10
10
  name='qui-server',
11
- version='1.16.3',
11
+ version='1.17.0',
12
12
  description='QUI server-side',
13
13
  author='Calin Crisan',
14
14
  author_email='ccrisan@gmail.com',