publish page, update User schema
parent
a9c74cb4ac
commit
b55a35b138
|
|
@ -0,0 +1,40 @@
|
||||||
|
env:
|
||||||
|
SUBFOLDER: example_dashboard
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["feature/pocketbase-server"]
|
||||||
|
paths: ["example_dashboard/**"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
deployments: write
|
||||||
|
name: Publish to Cloudflare Pages
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "16"
|
||||||
|
cache: "npm"
|
||||||
|
cache-dependency-path: "**/package-lock.json"
|
||||||
|
|
||||||
|
- name: Install Packages
|
||||||
|
working-directory: ${{env.SUBFOLDER}}
|
||||||
|
run: npm i
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{env.SUBFOLDER}}
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
working-directory: ${{env.SUBFOLDER}}
|
||||||
|
env:
|
||||||
|
PROJECT_NAME: velconnect
|
||||||
|
CLOUDFLARE_ACCOUNT_ID: 8077b5b1f8e2ade41874cbaa3f883069
|
||||||
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
run: npx wrangler@3.1.1 pages deploy ".svelte-kit/cloudflare" --project-name="${{env.PROJECT_NAME}}" --branch="${{env.GITHUB_REF_NAME}}"
|
||||||
|
|
@ -190,7 +190,7 @@ namespace VELConnect
|
||||||
{ DeviceField.pairing_code, PairingCode },
|
{ DeviceField.pairing_code, PairingCode },
|
||||||
});
|
});
|
||||||
|
|
||||||
// UpdateUserCount();
|
UpdateUserCount();
|
||||||
|
|
||||||
StartCoroutine(SlowLoop());
|
StartCoroutine(SlowLoop());
|
||||||
|
|
||||||
|
|
@ -797,7 +797,7 @@ namespace VELConnect
|
||||||
|
|
||||||
private void OnApplicationFocus(bool focus)
|
private void OnApplicationFocus(bool focus)
|
||||||
{
|
{
|
||||||
// UpdateUserCount(!focus);
|
UpdateUserCount(!focus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package migrations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/pocketbase/dbx"
|
||||||
|
"github.com/pocketbase/pocketbase/daos"
|
||||||
|
m "github.com/pocketbase/pocketbase/migrations"
|
||||||
|
"github.com/pocketbase/pocketbase/tools/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
m.Register(func(db dbx.Builder) error {
|
||||||
|
dao := daos.New(db);
|
||||||
|
|
||||||
|
collection, err := dao.FindCollectionByNameOrId("ve85cwsj7syqvxu")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
collection.CreateRule = nil
|
||||||
|
|
||||||
|
return dao.SaveCollection(collection)
|
||||||
|
}, func(db dbx.Builder) error {
|
||||||
|
dao := daos.New(db);
|
||||||
|
|
||||||
|
collection, err := dao.FindCollectionByNameOrId("ve85cwsj7syqvxu")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
collection.CreateRule = types.Pointer("")
|
||||||
|
|
||||||
|
return dao.SaveCollection(collection)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package migrations
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/pocketbase/dbx"
|
||||||
|
"github.com/pocketbase/pocketbase/daos"
|
||||||
|
m "github.com/pocketbase/pocketbase/migrations"
|
||||||
|
"github.com/pocketbase/pocketbase/tools/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
m.Register(func(db dbx.Builder) error {
|
||||||
|
dao := daos.New(db);
|
||||||
|
|
||||||
|
collection, err := dao.FindCollectionByNameOrId("ve85cwsj7syqvxu")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
collection.CreateRule = types.Pointer("")
|
||||||
|
|
||||||
|
return dao.SaveCollection(collection)
|
||||||
|
}, func(db dbx.Builder) error {
|
||||||
|
dao := daos.New(db);
|
||||||
|
|
||||||
|
collection, err := dao.FindCollectionByNameOrId("ve85cwsj7syqvxu")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
collection.CreateRule = nil
|
||||||
|
|
||||||
|
return dao.SaveCollection(collection)
|
||||||
|
})
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue