wiki-plugin-salon 0.0.1 → 0.0.2
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/client/salon.js +11 -1
- package/package.json +1 -1
- package/server/server.js +6 -6
package/client/salon.js
CHANGED
|
@@ -87,8 +87,18 @@ window.plugins.salon = (function() {
|
|
|
87
87
|
if (data.isOwner) {
|
|
88
88
|
const configDiv = document.createElement('div');
|
|
89
89
|
configDiv.style.cssText = 'border:1px solid rgba(196,181,253,0.2);border-radius:8px;padding:12px;margin-top:8px;background:rgba(124,58,237,0.06);font-family:system-ui;';
|
|
90
|
+
const pendingBadge = data.pendingCount > 0
|
|
91
|
+
? `<span style="background:#f59e0b;color:#000;border-radius:9px;font-size:0.7rem;padding:1px 6px;margin-left:6px;">${data.pendingCount} pending</span>`
|
|
92
|
+
: '';
|
|
90
93
|
configDiv.innerHTML = `
|
|
91
|
-
<div style="
|
|
94
|
+
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;">
|
|
95
|
+
<span style="font-size:0.8rem;color:#c4b5fd;font-weight:600;">Owner panel${pendingBadge}</span>
|
|
96
|
+
<a href="/plugin/salon/admin" target="_blank"
|
|
97
|
+
style="font-size:0.78rem;color:#7c3aed;text-decoration:none;border:1px solid rgba(124,58,237,0.4);border-radius:4px;padding:3px 8px;">
|
|
98
|
+
Admin ↗
|
|
99
|
+
</a>
|
|
100
|
+
</div>
|
|
101
|
+
<div style="font-size:0.8rem;color:#a0a0a0;margin-bottom:8px;">Allyabase URL</div>
|
|
92
102
|
<div style="display:flex;gap:6px;align-items:center;">
|
|
93
103
|
<input id="salon-url-input" value="${escapeHtml(data.allyabaseUrl || '')}" placeholder="https://dev.allyabase.com"
|
|
94
104
|
style="flex:1;background:#0d001a;border:1px solid rgba(196,181,253,0.3);border-radius:4px;padding:6px 8px;color:#e0d0ff;font-size:0.8rem;">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wiki-plugin-salon",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Federated Wiki plugin — community gathering space with self-registration and plugin event feeds",
|
|
5
5
|
"keywords": ["wiki", "plugin", "salon", "community", "planet-nine"],
|
|
6
6
|
"author": "Planet Nine",
|
package/server/server.js
CHANGED
|
@@ -638,9 +638,9 @@ function generateAdminPage(config, tenants) {
|
|
|
638
638
|
<label>Minnie port</label>
|
|
639
639
|
<input name="minniePort" type="number" value="${esc(String(config.minniePort || 2525))}" placeholder="2525">
|
|
640
640
|
|
|
641
|
-
<label>
|
|
642
|
-
<input name="
|
|
643
|
-
<div class="form-hint">
|
|
641
|
+
<label>Allyabase URL</label>
|
|
642
|
+
<input name="allyabaseUrl" value="${esc(config.allyabaseUrl || (config.joanUrl ? config.joanUrl.replace(/\/plugin\/allyabase\/joan$/, '') : ''))}" placeholder="https://dev.allyabase.com">
|
|
643
|
+
<div class="form-hint">Joan OTP codes are sent via <code>${esc(config.joanUrl || 'https://dev.allyabase.com/plugin/allyabase/joan')}</code></div>
|
|
644
644
|
|
|
645
645
|
<div style="margin-top:16px;">
|
|
646
646
|
<button type="submit" class="btn btn-primary btn-sm">Save Settings</button>
|
|
@@ -1175,9 +1175,9 @@ function startServer(params) {
|
|
|
1175
1175
|
if (minnieHost !== undefined) config.minnieHost = minnieHost.trim();
|
|
1176
1176
|
if (minniePort !== undefined) config.minniePort = parseInt(minniePort) || 2525;
|
|
1177
1177
|
if (joanUrl !== undefined) config.joanUrl = joanUrl.trim();
|
|
1178
|
-
if (allyabaseUrl !== undefined) {
|
|
1179
|
-
config.allyabaseUrl = allyabaseUrl.trim();
|
|
1180
|
-
config.joanUrl = allyabaseUrl
|
|
1178
|
+
if (allyabaseUrl !== undefined && allyabaseUrl.trim()) {
|
|
1179
|
+
config.allyabaseUrl = allyabaseUrl.trim().replace(/\/$/, '');
|
|
1180
|
+
config.joanUrl = config.allyabaseUrl + '/plugin/allyabase/joan';
|
|
1181
1181
|
}
|
|
1182
1182
|
saveConfig(config);
|
|
1183
1183
|
const derivedAllyabaseUrl = config.allyabaseUrl ||
|