pict-docuserve 1.4.13 → 1.4.14
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/dist/pict-docuserve.js +8 -3
- package/dist/pict-docuserve.js.map +1 -1
- package/dist/pict-docuserve.min.js +1 -1
- package/dist/pict-docuserve.min.js.map +1 -1
- package/package.json +1 -1
- package/source/providers/Pict-Provider-Docuserve-Documentation.js +16 -1
- package/source/views/PictView-Docuserve-TopBar-User.js +9 -5
package/package.json
CHANGED
|
@@ -1610,7 +1610,22 @@ class DocuserveDocumentationProvider extends libPictProvider
|
|
|
1610
1610
|
*/
|
|
1611
1611
|
resolveGitHubRepoURL(pGroup, pModule)
|
|
1612
1612
|
{
|
|
1613
|
-
if (!this._Catalog
|
|
1613
|
+
if (!this._Catalog)
|
|
1614
|
+
{
|
|
1615
|
+
return null;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
// Module-mode catalog: a single Module field, Groups is empty. On a
|
|
1619
|
+
// per-module docs site the route handlers leave CurrentModule blank, so
|
|
1620
|
+
// pModule may be empty -- the single Module is the answer either way.
|
|
1621
|
+
if (this._Catalog.Module && this._Catalog.Module.Name && (!pModule || this._Catalog.Module.Name === pModule))
|
|
1622
|
+
{
|
|
1623
|
+
let tmpModuleModeModule = this._Catalog.Module;
|
|
1624
|
+
let tmpModuleModeOrg = tmpModuleModeModule.Org || this._Catalog.GitHubOrg || 'stevenvelozo';
|
|
1625
|
+
return 'https://github.com/' + tmpModuleModeOrg + '/' + (tmpModuleModeModule.Repo || tmpModuleModeModule.Name);
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
if (!this._Catalog.Groups)
|
|
1614
1629
|
{
|
|
1615
1630
|
return null;
|
|
1616
1631
|
}
|
|
@@ -121,12 +121,16 @@ class DocuserveTopBarUserView extends libPictView
|
|
|
121
121
|
// per-module site, follows the current module on the aggregate).
|
|
122
122
|
let tmpGroup = tmpDocuserve.CurrentGroup;
|
|
123
123
|
let tmpModule = tmpDocuserve.CurrentModule;
|
|
124
|
-
|
|
124
|
+
let tmpDocProvider = this.pict.providers['Docuserve-Documentation'];
|
|
125
|
+
// On a per-module (module-mode) site the route handlers leave
|
|
126
|
+
// CurrentModule blank; the single documented module lives on the catalog.
|
|
127
|
+
if ((!tmpModule) && tmpDocProvider && tmpDocProvider._Catalog && tmpDocProvider._Catalog.Module)
|
|
125
128
|
{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
tmpModule = tmpDocProvider._Catalog.Module.Name;
|
|
130
|
+
}
|
|
131
|
+
if (tmpModule && tmpDocProvider && (typeof tmpDocProvider.resolveGitHubRepoURL === 'function'))
|
|
132
|
+
{
|
|
133
|
+
let tmpRepoURL = tmpDocProvider.resolveGitHubRepoURL(tmpGroup, tmpModule);
|
|
130
134
|
if (tmpRepoURL)
|
|
131
135
|
{
|
|
132
136
|
let tmpIcon = this.pict.icon('GitHub', { class: 'docuserve-octocat', ariaLabel: 'View source on GitHub' });
|