Skip to content

Commit

Permalink
add top page
Browse files Browse the repository at this point in the history
  • Loading branch information
iwate committed Jun 24, 2020
1 parent fb66e70 commit 3e9ed34
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 4 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Business Source License 1.1
Parameters

Licensor: aiplugs (@iwate)
Licensed Work: poshapp(v.0.9.41)
Licensed Work: poshapp(v.0.9.42)
The Licensed Work is (c) 2020 aiplugs.
Additional Use Grant: You may make use of the Licensed Work, provided that
you may not use the Licensed Work for a Software
Expand All @@ -14,7 +14,7 @@ Additional Use Grant: You may make use of the Licensed Work, provided that
contractors) to access the functionality of the
Licensed Work.

Change Date: 2023-06-23
Change Date: 2023-06-25

Change License: Apache License, Version 2.0

Expand Down
15 changes: 15 additions & 0 deletions src/Aiplugs.PoshApp/ElectronIpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@ public static void Setup(ScriptsService scriptsService)
await Electron.Shell.OpenExternalAsync("https://poshapp.aiplugs.com/licenses");
});

Electron.IpcMain.On("open-docs", async (url) =>
{
await Electron.Shell.OpenExternalAsync("https://github.com/aiplugs/poshapp/wiki");
});

Electron.IpcMain.On("open-issues", async (url) =>
{
await Electron.Shell.OpenExternalAsync("https://github.com/aiplugs/poshapp/issues");
});

Electron.IpcMain.On("open-releases", async (url) =>
{
await Electron.Shell.OpenExternalAsync("https://github.com/aiplugs/poshapp/releases");
});

Electron.IpcMain.On("open-repository-dir", async (name) =>
{
var repository = await scriptsService.GetRepository(name.ToString());
Expand Down
1 change: 1 addition & 0 deletions src/Aiplugs.PoshApp/Views/Shared/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<partial name="Pages/Detail" />
<partial name="Pages/List" />
<partial name="Pages/Singleton" />
<partial name="Pages/Index" />
<partial name="App" />

<script src="/lib/monaco-editor/main.bundle.js"></script>
Expand Down
40 changes: 40 additions & 0 deletions src/Aiplugs.PoshApp/Views/Shared/Pages/Index.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<template id="top-page-component">
<div class="main-content d-flex flex-column pa-10">
<h1 class="d-flex align-center mb-10 grey--text">
<img src="~/icon/poshapp-icon-grey.png" width="48" />
<span class="ma-4">POSH App</span>
</h1>

<h4>Documents</h4>
<p class="mb-10">
<a v-on:click="openDocs">https://github.com/aiplugs/poshapp/wiki</a>
</p>

<h4>Release notes</h4>
<p class="mb-10">
<a v-on:click="openReleases">https://github.com/aiplugs/poshapp/releases</a>
</p>

<h4>Bug Reports</h4>
<p class="mb-10">
<a v-on:click="openIssues">https://github.com/aiplugs/poshapp/issues</a>
</p>
</div>
</template>

<script>
Vue.component('TopPage', {
template: '#top-page-component',
methods: {
openDocs() {
ipcRenderer.send('open-docs');
},
openReleases() {
ipcRenderer.send('open-releases');
},
openIssues() {
ipcRenderer.send('open-issues');
}
}
})
</script>
2 changes: 1 addition & 1 deletion src/Aiplugs.PoshApp/electron.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"appId": "com.aiplugs.poshapp",
"productName": "POSH App",
"copyright": "Copyright © 2019",
"buildVersion": "0.9.41",
"buildVersion": "0.9.42",
"compression": "maximum",
"generateUpdatesFilesForAllChannels": true,
"directories": {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Aiplugs.PoshApp/wwwroot/js/router.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default new VueRouter({
routes: [
{ path: '/', components: { nav: Vue.component('PageNav') } },
{ path: '/', components: { default: Vue.component('TopPage'), nav: Vue.component('PageNav') } },
{ path: '/list/:repo/:id', components: { default: Vue.component('ListPage'), nav: Vue.component('PageNav') } },
{ path: '/singleton/:repo/:id', components: { default: Vue.component('SingletonPage'), nav: Vue.component('PageNav') } },
{ path: '/scripts/', components: { nav: Vue.component('ScriptsNav') } },
Expand Down

0 comments on commit 3e9ed34

Please sign in to comment.