From 858a93ccd2baa8906e5110a44d2e7f9c28d002f5 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Mon, 25 Sep 2023 18:02:39 -0700 Subject: [PATCH] feat(web): WIP registration page web component --- plugin/scripts/deploy-dev.sh | 2 +- .../dynamix.my.servers/include/state.php | 2 + web/_data/serverState.ts | 2 + .../{KeyActions.ce.vue => KeyActions.vue} | 14 +- web/components/Registration.ce.vue | 126 ++++++++++++++++++ web/components/Registration/Item.vue | 22 +++ web/components/Ui/CardWrapper.vue | 13 +- web/components/Ui/PageContainer.vue | 5 + web/components/UpdateOs.ce.vue | 4 +- web/nuxt.config.ts | 8 +- web/pages/index.vue | 10 +- web/pages/webComponents.vue | 10 +- web/store/server.ts | 8 ++ web/types/server.ts | 2 + 14 files changed, 198 insertions(+), 30 deletions(-) rename web/components/{KeyActions.ce.vue => KeyActions.vue} (73%) create mode 100644 web/components/Registration.ce.vue create mode 100644 web/components/Registration/Item.vue create mode 100644 web/components/Ui/PageContainer.vue diff --git a/plugin/scripts/deploy-dev.sh b/plugin/scripts/deploy-dev.sh index 102da7e04..8979540b1 100755 --- a/plugin/scripts/deploy-dev.sh +++ b/plugin/scripts/deploy-dev.sh @@ -29,7 +29,7 @@ source_directory="plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dyna destination_directory="/usr/local/emhttp/plugins/dynamix.my.servers" # Replace the value inside the rsync command with the user's input -rsync_command="rsync -avz --progress --stats -m -e ssh \"$source_directory/\" \"root@${server_name}.local:$destination_directory/\"" +rsync_command="rsync -avz --progress --stats -m -e ssh \"$source_directory/\" \"root@${server_name}:$destination_directory/\"" echo "Executing the following command:" echo "$rsync_command" diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/state.php b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/state.php index b21b59cb8..d0d6ec743 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/state.php +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/state.php @@ -61,6 +61,8 @@ $serverState = [ "protocol" => $_SERVER['REQUEST_SCHEME'], "regGen" => (int)$var['regGen'], "regGuid" => $var['regGUID'], + "regTo" => $var['regTo'], + "regTm" => $var['regTm'] * 1000, // JS expects milliseconds "registered" => $registered, "registeredTime" => $myservers['remote']['regWizTime'] ?? '', "site" => $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'], diff --git a/web/_data/serverState.ts b/web/_data/serverState.ts index 87136e908..b0cfd0bee 100644 --- a/web/_data/serverState.ts +++ b/web/_data/serverState.ts @@ -61,6 +61,8 @@ export const serverState: Server = { osVersion: '6.12.3', registered: true, regGen: 0, + regTm: uptime, + regTo: 'Zack Spear', // "regGuid": "0781-5583-8355-81071A2B0211", site: 'http://localhost:4321', state, diff --git a/web/components/KeyActions.ce.vue b/web/components/KeyActions.vue similarity index 73% rename from web/components/KeyActions.ce.vue rename to web/components/KeyActions.vue index 8b31e8b31..3a13864d9 100644 --- a/web/components/KeyActions.ce.vue +++ b/web/components/KeyActions.vue @@ -1,12 +1,12 @@ @@ -25,9 +25,3 @@ const { keyActions } = storeToRefs(useServerStore()); - - diff --git a/web/components/Registration.ce.vue b/web/components/Registration.ce.vue new file mode 100644 index 000000000..047cad7a7 --- /dev/null +++ b/web/components/Registration.ce.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/web/components/Registration/Item.vue b/web/components/Registration/Item.vue new file mode 100644 index 000000000..a1a84d3d6 --- /dev/null +++ b/web/components/Registration/Item.vue @@ -0,0 +1,22 @@ + + diff --git a/web/components/Ui/CardWrapper.vue b/web/components/Ui/CardWrapper.vue index 01007d628..81a19e8a6 100644 --- a/web/components/Ui/CardWrapper.vue +++ b/web/components/Ui/CardWrapper.vue @@ -1,13 +1,20 @@