« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/static-page.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things/static-page.js')
-rw-r--r--src/data/things/static-page.js23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/data/things/static-page.js b/src/data/things/static-page.js
index 3d8d474c..ab9c5f98 100644
--- a/src/data/things/static-page.js
+++ b/src/data/things/static-page.js
@@ -1,16 +1,21 @@
+import {isName} from '#validators';
+
+import {
+  directory,
+  name,
+  simpleString,
+} from '#composite/wiki-properties';
+
 import Thing from './thing.js';
 
 export class StaticPage extends Thing {
   static [Thing.referenceType] = 'static';
+  static [Thing.friendlyName] = `Static Page`;
 
-  static [Thing.getPropertyDescriptors] = ({
-    validators: {
-      isName,
-    },
-  }) => ({
+  static [Thing.getPropertyDescriptors] = () => ({
     // Update & expose
 
-    name: Thing.common.name('Unnamed Static Page'),
+    name: name('Unnamed Static Page'),
 
     nameShort: {
       flags: {update: true, expose: true},
@@ -22,8 +27,8 @@ export class StaticPage extends Thing {
       },
     },
 
-    directory: Thing.common.directory(),
-    content: Thing.common.simpleString(),
-    stylesheet: Thing.common.simpleString(),
+    directory: directory(),
+    content: simpleString(),
+    stylesheet: simpleString(),
   });
 }