« 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.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/data/things/static-page.js b/src/data/things/static-page.js
index 3d8d474c..0133e0b6 100644
--- a/src/data/things/static-page.js
+++ b/src/data/things/static-page.js
@@ -1,16 +1,18 @@
-import Thing from './thing.js';
+import {isName} from '#validators';
+
+import Thing, {
+  directory,
+  name,
+  simpleString,
+} from './thing.js';
 
 export class StaticPage extends Thing {
   static [Thing.referenceType] = 'static';
 
-  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 +24,8 @@ export class StaticPage extends Thing {
       },
     },
 
-    directory: Thing.common.directory(),
-    content: Thing.common.simpleString(),
-    stylesheet: Thing.common.simpleString(),
+    directory: directory(),
+    content: simpleString(),
+    stylesheet: simpleString(),
   });
 }