Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy sample wasm #138

Merged
merged 340 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
340 commits
Select commit Hold shift + click to select a range
f895ea6
feat: support inner left content, fix formatting bug.
rabbitism Jan 14, 2024
d3c54f3
fix: minor fixes.
rabbitism Jan 14, 2024
eaf9f06
Merge pull request #65 from irihitech/messagebox
zdpcdt Jan 15, 2024
aa5dd3c
feat: add chrome layer for Win10.
rabbitism Jan 15, 2024
98a5c3c
fix: fix on linux.
rabbitism Jan 15, 2024
27d793a
Merge pull request #68 from irihitech/67-message
rabbitism Jan 15, 2024
697b03a
fix: fix readonly, remove AllowWheel.
rabbitism Jan 16, 2024
cb89dc2
Merge pull request #66 from irihitech/numeric
zdpcdt Jan 16, 2024
13e3079
feat: init
rabbitism Jan 16, 2024
e619102
feat: length calculation.
rabbitism Jan 17, 2024
a43dede
feat: implement arrangement and dragging
rabbitism Jan 17, 2024
e1b5a52
feat: template binding
rabbitism Jan 17, 2024
696058f
feat: implement dual dragging.
rabbitism Jan 17, 2024
9057803
feat: add thumb cache to avoid drag conflict.
rabbitism Jan 18, 2024
8c3004b
feat: implement snap to tick.
rabbitism Jan 18, 2024
2d37fc8
feat: update demo.
rabbitism Jan 18, 2024
0e91c84
feat: initialize dialog.
rabbitism Jan 19, 2024
22ed164
fix: make thumb overlaying sections.
rabbitism Jan 19, 2024
236a44c
feat: refactor length calculation.
rabbitism Jan 19, 2024
33543c7
fix: fix vertical bug.
rabbitism Jan 19, 2024
48bdb2c
feat: enable tick visual.
rabbitism Jan 19, 2024
c17f5cb
feat: clean up code. add event to slider.
rabbitism Jan 19, 2024
7cc8212
feat: Update resources.
rabbitism Jan 19, 2024
d847540
feat: improve badge.
rabbitism Jan 19, 2024
63f8282
fix vertical issue, fix coerce typo.
rabbitism Jan 19, 2024
28a8df2
fix: fix reapplying template initialization issue.
rabbitism Jan 19, 2024
5964108
feat: change demo layout.
rabbitism Jan 20, 2024
497a8c2
feat: setup demo.
rabbitism Jan 20, 2024
a0598b6
WIP
rabbitism Jan 21, 2024
2c361f9
feat: WIP dialog window.
rabbitism Jan 21, 2024
9cff01c
feat: WIP
rabbitism Jan 22, 2024
d2f01c1
feat: :pressed, comparison.
zdpcdt Jan 22, 2024
2563b96
fix: fix vertical direction issue.
zdpcdt Jan 22, 2024
5c62131
feat: implement closing related features.
rabbitism Jan 22, 2024
f0ec32c
feat: add overlay dialog sample.
rabbitism Jan 22, 2024
0a3f7db
feat: fix memory leakage.
rabbitism Jan 22, 2024
c969842
feat: set result.
rabbitism Jan 22, 2024
611e2bc
feat: WIP
rabbitism Jan 22, 2024
7c29320
fix: pass default value when close from control.
rabbitism Jan 22, 2024
61ebba8
feat: extract common button style.
rabbitism Jan 23, 2024
c8540fe
feat: implement multi layer dialog.
rabbitism Jan 23, 2024
b8d258c
feat: implement layer change.
rabbitism Jan 23, 2024
e06d6ff
feat: improve layer calculation
rabbitism Jan 23, 2024
9441d75
feat: clean up code, allow empty host, simplify z index calculation.
rabbitism Jan 23, 2024
564a534
feat: simplify name, set to center by default.
rabbitism Jan 23, 2024
a174f0c
feat: unify layer update code.
rabbitism Jan 24, 2024
624272f
Merge pull request #70 from irihitech/slider
zdpcdt Jan 24, 2024
a17f107
feat: implement default button for dialog control.
rabbitism Jan 24, 2024
430dccc
feat: ultimate refactoring to separate default dialog and custom dialog.
rabbitism Jan 24, 2024
87bb47b
feat: introduce class helper here.
rabbitism Jan 25, 2024
20f723b
feat: implement default control and window mode.
rabbitism Jan 25, 2024
fe61ba8
feat: implement overlay messagebox, unify messagebox and dialog layout.
rabbitism Jan 25, 2024
b327a7c
fix: fix window fontsize.
rabbitism Jan 25, 2024
af02b46
feat: update demo.
rabbitism Jan 25, 2024
8d36929
feat: add annotation.
rabbitism Jan 25, 2024
04995a2
feat: make bindingmode twoway.
rabbitism Jan 25, 2024
f4baf18
Merge pull request #72 from irihitech/69-numeric
rabbitism Jan 25, 2024
d1bb258
feat: initialize and setup demo.
rabbitism Jan 25, 2024
2855f49
feat: add value validation.
rabbitism Jan 25, 2024
8bb6d51
feat: implement box shadow.
rabbitism Jan 25, 2024
ef7ba74
feat: change dark dialog window background.
rabbitism Jan 25, 2024
e8da184
feat: add default width.
rabbitism Jan 26, 2024
34c247d
Merge pull request #73 from irihitech/enum
zdpcdt Jan 26, 2024
7f0c858
feat: make button group functional. Update Demo.
rabbitism Jan 26, 2024
14b6a0f
feat: mark updated.
rabbitism Jan 26, 2024
2a5de69
Merge pull request #74 from irihitech/buttonGroup
rabbitism Jan 26, 2024
ccc883d
feat: add two tone icon.
rabbitism Jan 26, 2024
25c36c9
feat: improve button group demo.
rabbitism Jan 27, 2024
cfbf58e
Merge pull request #75 from irihitech/icon
rabbitism Jan 27, 2024
4c82122
Merge branch 'main' into dialog
rabbitism Jan 27, 2024
b46eb8c
feat: support top and bottom icon button.
rabbitism Jan 27, 2024
bea0618
fix: fix padding.
rabbitism Jan 27, 2024
96af675
Merge pull request #76 from irihitech/64-icon-button
rabbitism Jan 27, 2024
befa5d4
Merge pull request #71 from irihitech/dialog
rabbitism Jan 27, 2024
e18534d
fix: fix menu order.
rabbitism Jan 27, 2024
f0c8d5d
feat: implement locale switch.
rabbitism Jan 27, 2024
e5eb273
fix: fix null exception.
rabbitism Jan 27, 2024
0e5f508
Merge pull request #77 from irihitech/local
rabbitism Jan 27, 2024
300ef5a
fix: fix null issue.
rabbitism Jan 27, 2024
a683f48
feat: update version.
rabbitism Jan 27, 2024
7b8d91c
Update README.md
rabbitism Jan 28, 2024
603f92a
feat: quick fix and rename.
rabbitism Jan 28, 2024
9ea537f
feat: update version.
rabbitism Jan 28, 2024
1dc37c0
feat: class input control.
rabbitism Jan 30, 2024
a8de032
feat: disable duplicate.
rabbitism Jan 30, 2024
93029b4
feat: make TargetClasses internal.
rabbitism Jan 30, 2024
553d413
WIP: undo redo
rabbitism Jan 30, 2024
d549b47
feat: handle remove in taginput.
rabbitism Jan 31, 2024
dc3d9fe
feat: disable undo redo.
rabbitism Jan 31, 2024
90dd1a3
feat: add separator.
rabbitism Jan 31, 2024
af61b48
Fix: fix pointer press handling.
rabbitism Jan 31, 2024
6ec1c47
Merge pull request #83 from irihitech/issue/82
rabbitism Jan 31, 2024
4dc0fd9
DialogControl 增加 ShowCustom 方法
idea-zone Feb 1, 2024
fb323e0
Merge pull request #85 from ForkFunny/main
rabbitism Feb 1, 2024
fb11be0
feat: dialog: refactor to support non-generic call, add options and r…
rabbitism Feb 1, 2024
8f4d88b
feat: refactor OverlayDialog and add options.
rabbitism Feb 1, 2024
1d01022
feat: use another datatemplate collection.
rabbitism Feb 1, 2024
7e488d2
feat: add CloseOnMaskToClose
rabbitism Feb 1, 2024
6e8ab8c
feat: add cancellation token support.
rabbitism Feb 2, 2024
75503b8
feat: advanced dialog layout.
rabbitism Feb 2, 2024
50a7645
feat: change click on mask demo visibility.
rabbitism Feb 2, 2024
97d641f
fix: fix divided by zero issue.
rabbitism Feb 2, 2024
3ee3e71
fix: fix close from non-ui thread.
rabbitism Feb 2, 2024
96ca0d9
feat: make closedialog internal.
rabbitism Feb 2, 2024
39457f9
feat: re-organize file, add IsCloseButtonVisible option.
rabbitism Feb 3, 2024
2b022a5
feat: set close button visibility from option.
rabbitism Feb 3, 2024
6d20264
feat: fix bottom and right anchoring.
rabbitism Feb 3, 2024
15203b4
feat: fix MessageBox default position, use internal option default in…
rabbitism Feb 3, 2024
0f97da7
Merge pull request #86 from irihitech/dialog
rabbitism Feb 3, 2024
6cf169e
feat: add prism extension.
rabbitism Feb 3, 2024
35027e0
feat: add prism sample.
rabbitism Feb 3, 2024
ed21ee8
feat: pre job: change events to routed events.
rabbitism Feb 3, 2024
f3cd4fb
feat: WIP set up interface.
rabbitism Feb 4, 2024
ff8d4b1
WIP: animation.
rabbitism Feb 4, 2024
dbbf6b6
feat: refactor dialog host to accept drawer.
rabbitism Feb 4, 2024
5b8763b
feat: add appear animation.
rabbitism Feb 4, 2024
2ac5dfa
feat: WIP.
rabbitism Feb 4, 2024
35b3a2f
feat: replace mask with pure rectangle to reduce layout calculation
rabbitism Feb 5, 2024
8e085bc
feat: refactor layer storage and index reset rule.
rabbitism Feb 5, 2024
fd85efd
feat: basic position.
rabbitism Feb 5, 2024
36c63b6
feat: implement resizing logic.
rabbitism Feb 5, 2024
ea4ce2c
feat: add default template, add sample.
rabbitism Feb 5, 2024
32ed8ad
fix: update demo.
rabbitism Feb 5, 2024
26386e8
feat: add extra overloads for prism usage.
rabbitism Feb 5, 2024
662cbc3
feat: further simplify pure rectangle.
rabbitism Feb 6, 2024
d5d9bae
Merge pull request #90 from irihitech/class
rabbitism Feb 6, 2024
a7acf3a
Merge pull request #91 from irihitech/prism
rabbitism Feb 6, 2024
84ad981
Merge pull request #93 from irihitech/drawer
rabbitism Feb 6, 2024
5f35f57
feat: Theme toggler
rabbitism Feb 6, 2024
b297b3f
feat: add demo, sync theme from scope.
rabbitism Feb 6, 2024
9532103
fix: unregister from old scope.
rabbitism Feb 6, 2024
f83fc1e
fix: resolve ns conflict.
rabbitism Feb 6, 2024
a778ae8
Merge pull request #95 from irihitech/theme
rabbitism Feb 6, 2024
5987272
feat: make loading icon only animate when visible, to reduce GPU usag…
rabbitism Feb 6, 2024
f92d8b8
Merge pull request #97 from irihitech/loading2
rabbitism Feb 6, 2024
0bb6c20
feat: add prism drawer service.
rabbitism Feb 6, 2024
41aa97a
Merge pull request #98 from irihitech/prism_drawer
rabbitism Feb 6, 2024
7e57a0c
feat: refactor to simplify null control property and event initializa…
rabbitism Feb 7, 2024
9259228
fix: fix close order.
rabbitism Feb 7, 2024
6d56028
Merge pull request #99 from irihitech/share
rabbitism Feb 7, 2024
508c362
feat: replace IDialogContext by shared library.
rabbitism Feb 7, 2024
2f251c2
feat: make NumericUpDownBase inherit IClearControl.
rabbitism Feb 7, 2024
31b25a4
Merge pull request #100 from irihitech/share
rabbitism Feb 7, 2024
da511c6
feat: add selection list.
rabbitism Feb 8, 2024
2a08391
feat: improve demo.
rabbitism Feb 8, 2024
c288836
fix: hack a default size.
rabbitism Feb 8, 2024
f758ceb
Merge pull request #101 from irihitech/selection
rabbitism Feb 8, 2024
974afa3
feat: add two attached properties to mark an custom element triggerin…
rabbitism Feb 8, 2024
9a34ce2
feat: add a property to show if there is modal dialog available in a …
rabbitism Feb 8, 2024
896d22d
fix: make disappear animation only work on modal mask.
rabbitism Feb 8, 2024
7a9bdf2
feat: simplify dialog option.
rabbitism Feb 9, 2024
f6f216f
feat: make drawer api similar to dialog.
rabbitism Feb 9, 2024
56ce434
Merge pull request #103 from irihitech/issue/102
rabbitism Feb 9, 2024
349d9f1
fix: fix drawer extension.
rabbitism Feb 9, 2024
8f20e82
Merge pull request #104 from irihitech/issue/102
rabbitism Feb 9, 2024
36bb3b5
WIP: init.
rabbitism Feb 11, 2024
49fdf80
feat: try to use grid as panel.
rabbitism Feb 11, 2024
5e5e084
feat: try to setup communication.
rabbitism Feb 11, 2024
0a3dcf0
feat: deal with selection.
rabbitism Feb 11, 2024
bc9412a
WIP: inherit binding from root.
rabbitism Feb 12, 2024
f9802d2
feat: add pseudo classes.
rabbitism Feb 12, 2024
dc3c61d
wip.
rabbitism Feb 12, 2024
c6f440b
wip: simplify container preparation.
rabbitism Feb 12, 2024
cff3cdb
feat: update dependency.
rabbitism Feb 13, 2024
d99a081
feat: update version.
rabbitism Feb 13, 2024
e227788
feat: add more templates.
rabbitism Feb 13, 2024
89e8c2c
feat: default styling.
rabbitism Feb 13, 2024
a302081
feat: temp solution for highlight.
rabbitism Feb 13, 2024
7051521
feat: resolve highlight binding issue.
rabbitism Feb 13, 2024
ec41a82
feat: use popup instead of flyout. improve demo.
rabbitism Feb 13, 2024
32f5662
feat: add header footer to navmenu.
rabbitism Feb 13, 2024
f2073f4
feat: add separator.
rabbitism Feb 13, 2024
f67a5a3
feat: add toggle registration.
rabbitism Feb 13, 2024
122f89f
feat: add function to set selected item from outside and sync to UI.
rabbitism Feb 14, 2024
2918edb
feat: add a comment.
rabbitism Feb 14, 2024
cfb728c
feat: add selection change event.
rabbitism Feb 14, 2024
acd1bde
Merge pull request #105 from irihitech/nav
rabbitism Feb 14, 2024
d141831
feat: replace ursa demo with nav menu.
rabbitism Feb 14, 2024
ea44776
feat: make tooltip utilize header template.
rabbitism Feb 14, 2024
e286f3f
Merge pull request #106 from irihitech/doc
rabbitism Feb 14, 2024
7102a63
feat: add disable container.
rabbitism Feb 14, 2024
b38b5de
feat: update demo.
rabbitism Feb 14, 2024
3b3368b
feat: add adorner flavor usage.
rabbitism Feb 15, 2024
495b565
feat: add form infra.
rabbitism Feb 16, 2024
46cd9c8
feat: add transition based number displayer.
rabbitism Feb 16, 2024
35d0d5a
feat: use animator instead of transition.
rabbitism Feb 17, 2024
e7b9984
feat: add a sample for date.
rabbitism Feb 17, 2024
40454bc
feat: inherit font properties.
rabbitism Feb 17, 2024
a4c214c
feat: re-org files.
rabbitism Feb 17, 2024
a574fb7
feat: add temp template.
rabbitism Feb 17, 2024
14c7e6b
wip: more properties.
rabbitism Feb 18, 2024
66835a8
feat: add more properties.
rabbitism Feb 18, 2024
a8d1073
feat: improve demo, add dynamic resource.
rabbitism Feb 18, 2024
2bb4644
feat: simplify resource.
rabbitism Feb 18, 2024
e2f155a
feat: add group margin.
rabbitism Feb 18, 2024
3b7bb99
feat: add implementation.
rabbitism Feb 18, 2024
728185b
feat: add option to make it selectable.
rabbitism Feb 18, 2024
9b5db3c
Merge pull request #110 from irihitech/string
zdpcdt Feb 18, 2024
7641281
fix: set minwidth instead of width.
rabbitism Feb 18, 2024
758f7a4
Merge pull request #112 from irihitech/issue/107
zdpcdt Feb 19, 2024
966db68
feat: several fixes.
rabbitism Feb 19, 2024
30df51f
Merge pull request #113 from irihitech/fix
rabbitism Feb 19, 2024
dce46b9
fix: typo.
zdpcdt Feb 19, 2024
e179abb
Merge pull request #109 from irihitech/disable
zdpcdt Feb 19, 2024
3247a37
Merge pull request #111 from irihitech/form
zdpcdt Feb 20, 2024
76da0b3
feat: initialize, setup demo. make sure MVVM works.
rabbitism Feb 20, 2024
ab4b74d
feat: wip.
rabbitism Feb 21, 2024
6f4e11c
feat: layout calculation.
rabbitism Feb 21, 2024
395d185
feat: move identification to measure process.
rabbitism Feb 21, 2024
d5a8064
feat: implement dynamic measure.
rabbitism Feb 22, 2024
8d1660b
fix: fix a default binding issue.
rabbitism Feb 22, 2024
39b7424
feat: fix weird blinking issue.
rabbitism Feb 23, 2024
1ccb395
feat: simplify container generation, and add vertical demo.
rabbitism Feb 23, 2024
0965f9d
feat: add separator support, fix various issues.
rabbitism Feb 23, 2024
791269a
feat: unify to only one template.
rabbitism Feb 23, 2024
cf52bcf
feat: improve demo.
rabbitism Feb 23, 2024
ef8686a
feat: reduce icon visual.
rabbitism Feb 23, 2024
a948481
Merge pull request #114 from irihitech/toolbar
rabbitism Feb 23, 2024
101751b
fix: fix #53.
rabbitism Feb 25, 2024
6ef16d2
feat: update dependency, simplify code, remove navigation control.
rabbitism Feb 25, 2024
27581ac
Merge pull request #119 from irihitech/issue/116
rabbitism Feb 25, 2024
fbef065
feat: close existing dialogs when host is unregistered.
rabbitism Feb 25, 2024
1fb007f
Merge pull request #120 from irihitech/issue/118
rabbitism Feb 25, 2024
8e718eb
feat: update menu status.
rabbitism Feb 25, 2024
5e6db00
feat: add badge font size.
rabbitism Feb 25, 2024
fbc84c4
Merge pull request #45 from irihitech/badge
rabbitism Feb 25, 2024
ea92839
feat: fix introduction demo after badge change.
rabbitism Feb 25, 2024
41178bc
feat: fix active animation issue.
rabbitism Feb 25, 2024
cccdfa0
Merge branch 'main' into main
rabbitism Feb 25, 2024
7d8c62d
Merge pull request #60 from Coolkeke/main
rabbitism Feb 25, 2024
bd55c45
Merge branch 'main' into Coolkeke/main
rabbitism Feb 25, 2024
4e79369
feat: fix various issues.
rabbitism Feb 25, 2024
6fe134b
Merge pull request #121 from irihitech/Coolkeke/main
rabbitism Feb 25, 2024
fc80e1b
feat: replace pure rectangle in several places. use pure rectangle in…
rabbitism Feb 25, 2024
bbc8d65
Merge pull request #122 from irihitech/fix
rabbitism Feb 26, 2024
fa72898
Merge pull request #115 from irihitech/issue/53
zdpcdt Feb 26, 2024
38b4990
misc: success order.
zdpcdt Feb 26, 2024
a84c9f4
fix: IPAddress DefaultBindingMode.
zdpcdt Feb 26, 2024
d6da65a
Merge pull request #123 from irihitech/issue/53
rabbitism Feb 26, 2024
8f4c727
fix: BadgeContentForeground.
zdpcdt Feb 26, 2024
cb97373
feat: more precise selector.
zdpcdt Feb 26, 2024
03b3cc8
Merge pull request #125 from irihitech/issue/124
rabbitism Feb 26, 2024
cde18e7
feat: Badge's badge.
zdpcdt Feb 26, 2024
68fbc9e
feat: update version.
zdpcdt Feb 26, 2024
1ccac25
Merge pull request #126 from irihitech/issue/124
rabbitism Feb 26, 2024
81f97f5
fix: Icon does not have a centering issue.
ProjectLion Feb 28, 2024
d2b2448
Merge pull request #133 from ProjectLion/HtDev
rabbitism Feb 28, 2024
10cd9b9
feat: update deploy.yml
zdpcdt Mar 2, 2024
2a0c3c1
Merge pull request #137 from irihitech/workflow
rabbitism Mar 2, 2024
eaf0ae5
Merge branch 'deploy' into main-1
rabbitism Mar 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 30 additions & 27 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Deploy to GitHub Pages

env:
PROJECT_PATH: demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj
OUTPUT_PATH: demo/Ursa.Demo.Browser/bin/Debug/net7.0/browser-wasm/AppBundle
PROJECT_PATH: demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj
OUTPUT_PATH: demo/Ursa.Demo.Browser/bin/Release/net7.0/browser-wasm/AppBundle
on:
push:
branches: [ "deploy" ]
Expand All @@ -13,38 +13,41 @@ jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/[email protected]

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
- name: Setup .NET 7
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.405

- name: Install wasm-tools
run: dotnet workload install wasm-tools wasm-experimental
- name: Install wasm-tools
run: dotnet workload install wasm-tools wasm-tools-net7

- name: Install DotNetCompress
run: dotnet tool install --global DotNetCompress --version 2.0.0 --no-cache
- name: Install DotNetCompress
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache

- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -c Debug -o debug --nologo
- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo

- name: Change base-tag in index.html
run: sed -i 's/<base href="\/" \/>/<base href="\/Ursa.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
- name: Change base-tag in index.html
run: sed -i 's/<base href="\/" \/>/<base href="\/Ursa.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html

- name: copy index.html to 404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
- name: copy index.html to 404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html

- name: Compress Output using Brotli
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
- name: Compress Output using Brotli
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4

- name: Compress Output using GZip
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
- name: Compress Output using GZip
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4

- name: Add .nojekyll file
run: touch $OUTPUT_PATH/.nojekyll
- name: Add .nojekyll file
run: touch $OUTPUT_PATH/.nojekyll

- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ${{ env.OUTPUT_PATH }}
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ${{ env.OUTPUT_PATH }}
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

Ursa is a UI library for building cross-platform UIs with Avalonia UI.

![Demo](./assets/demo.png)

## How to use
1. Ursa

Add nuget package:
```bash
dotnet add package Irihi.Ursa --version 0.1.0-beta20230702
dotnet add package Irihi.Ursa --version 0.2.0-beta20240129
```

You can now use Ursa controls in your Avalonia Application.
Expand Down Expand Up @@ -39,14 +41,18 @@ Ursa.Themes.Semi is a theme package for Ursa inspired by Semi Design. You can ad

Add nuget package:
```bash
dotnet add package Semi.Avalonia --version 11.0.0-rc1
dotnet add package Irihi.Ursa.Themes.Semi --version 0.1.0-beta20230702
dotnet add package Semi.Avalonia --version 11.0.7
dotnet add package Irihi.Ursa.Themes.Semi --version 0.2.0-beta20240129
```

Include Styles in application:
```xaml
<Application...
xmlns:u-semi="https://irihi.tech/ursa/themes/semi"
....>

<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
<StyleInclude Source="avares://Ursa.Themes.Semi/Index.axaml" />
<u-semi:SemiTheme Locale="zh-CN"/>
</Application.Styles>
```
```
13 changes: 13 additions & 0 deletions Ursa.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ursa.Demo.iOS", "demo\Ursa.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ursa.Demo.Browser", "demo\Ursa.Demo.Browser\Ursa.Demo.Browser.csproj", "{D1942476-8473-4608-BB9F-5AC01083BBDA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ursa.PrismExtension", "src\Ursa.PrismExtension\Ursa.PrismExtension.csproj", "{2E934F60-F5DF-4856-B05A-B949C7F9D948}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ursa.PrismDialogDemo", "demo\Ursa.PrismDialogDemo\Ursa.PrismDialogDemo.csproj", "{F99B3D07-4560-4B05-892C-0FF2757FEF2E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -50,12 +54,21 @@ Global
{D1942476-8473-4608-BB9F-5AC01083BBDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1942476-8473-4608-BB9F-5AC01083BBDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1942476-8473-4608-BB9F-5AC01083BBDA}.Release|Any CPU.Build.0 = Release|Any CPU
{2E934F60-F5DF-4856-B05A-B949C7F9D948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E934F60-F5DF-4856-B05A-B949C7F9D948}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E934F60-F5DF-4856-B05A-B949C7F9D948}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E934F60-F5DF-4856-B05A-B949C7F9D948}.Release|Any CPU.Build.0 = Release|Any CPU
{F99B3D07-4560-4B05-892C-0FF2757FEF2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F99B3D07-4560-4B05-892C-0FF2757FEF2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F99B3D07-4560-4B05-892C-0FF2757FEF2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F99B3D07-4560-4B05-892C-0FF2757FEF2E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{407A91FD-A88B-459B-8DCE-8C6AA98279FE} = {A41BAF0D-DA61-4A63-889A-084BAD36FD66}
{3FC76CD9-CE5D-4804-A8D6-4E292EB296AA} = {A41BAF0D-DA61-4A63-889A-084BAD36FD66}
{B6BAB821-A9FE-44F3-B9CD-06E27FDB63F6} = {A41BAF0D-DA61-4A63-889A-084BAD36FD66}
{94C2BBD9-8B57-4AE9-AAFD-7D4335B15A8E} = {A41BAF0D-DA61-4A63-889A-084BAD36FD66}
{D1942476-8473-4608-BB9F-5AC01083BBDA} = {A41BAF0D-DA61-4A63-889A-084BAD36FD66}
{F99B3D07-4560-4B05-892C-0FF2757FEF2E} = {A41BAF0D-DA61-4A63-889A-084BAD36FD66}
EndGlobalSection
EndGlobal
Binary file added assets/demo.png
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 demo/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.0.0</AvaloniaVersion>
<AvaloniaVersion>11.0.9</AvaloniaVersion>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<AvaloniaUseCompiledBindingsByDefault>false</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>

<PropertyGroup>
Expand Down
5 changes: 3 additions & 2 deletions demo/Ursa.Demo/App.axaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Application
x:Class="Ursa.Demo.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u-semi="https://irihi.tech/ursa/themes/semi">
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
<StyleInclude Source="avares://Ursa.Themes.Semi/Index.axaml" />
<u-semi:SemiTheme Locale="zh-CN" />
</Application.Styles>
</Application>
Binary file added demo/Ursa.Demo/Assets/IRIHI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/Ursa.Demo/Assets/WORLD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions demo/Ursa.Demo/Converters/IconNameToPathConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using System.Globalization;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Data.Converters;
using Avalonia.Media;

namespace Ursa.Demo.Converters;

public class IconNameToPathConverter: IValueConverter
{
private string[] paths = new[]
{
"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z",
"M16 12L9 2L2 12H3.86L0 18H7V22H11V18H18L14.14 12H16M20.14 12H22L15 2L12.61 5.41L17.92 13H15.97L19.19 18H24L20.14 12M13 19H17V22H13V19Z",
"M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z",
"M5 21C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5V19C21 20.1 20.1 21 19 21H5M15.3 16L13.2 13.9L17 10L14.2 7.2L10.4 11.1L8.2 8.9V16H15.3Z",
"M16,9V7H12V12.5C11.58,12.19 11.07,12 10.5,12A2.5,2.5 0 0,0 8,14.5A2.5,2.5 0 0,0 10.5,17A2.5,2.5 0 0,0 13,14.5V9H16M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2Z",
"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",
"M12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12S17.5 2 12 2M12.5 13H11V7H12.5V11.3L16.2 9.2L17 10.5L12.5 13Z"
};
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is int i)
{
string s = paths[i % paths.Length];
return StreamGeometry.Parse(s);
}
else if (value is string s)
{
int hash = s.GetHashCode();
string path = paths[Math.Abs(hash) % paths.Length];
return StreamGeometry.Parse(path);
}
return AvaloniaProperty.UnsetValue;
}

public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return AvaloniaProperty.UnsetValue;
}
}
32 changes: 32 additions & 0 deletions demo/Ursa.Demo/Converters/TimelineIconConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;
using System.Globalization;
using Avalonia;
using Avalonia.Data;
using Avalonia.Data.Converters;
using Avalonia.Media;
using Ursa.Controls;

namespace Ursa.Demo.Converters;

public class TimelineIconConverter: IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is TimelineItemType t)
{
return t switch
{
TimelineItemType.Success => Brushes.Green,
TimelineItemType.Ongoing => Brushes.Blue,
TimelineItemType.Error => Brushes.Red,
_ => Brushes.Gray
};
}
return AvaloniaProperty.UnsetValue;
}

public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
56 changes: 56 additions & 0 deletions demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Templates;
using Avalonia.Data;
using Ursa.Controls;
using Ursa.Demo.ViewModels;

namespace Ursa.Demo.Converters;

public class ToolBarItemTemplateSelector: IDataTemplate
{

public static ToolBarItemTemplateSelector Instance { get; } = new();
public Control? Build(object? param)
{
if (param is null) return null;
if (param is ToolBarSeparatorViewModel sep)
{
return new ToolBarSeparator();
}
if (param is ToolBarButtonItemViewModel vm)
{
return new Button()
{
[!ContentControl.ContentProperty] = new Binding() { Path = "Content" },
[!Button.CommandProperty] = new Binding() { Path = "Command" },
[!ToolBar.OverflowModeProperty] = new Binding(){Path = nameof(ToolBarItemViewModel.OverflowMode)},
};
}
if (param is ToolBarCheckBoxItemViweModel cb)
{
return new CheckBox()
{
[!ContentControl.ContentProperty] = new Binding() { Path = "Content" },
[!ToggleButton.IsCheckedProperty] = new Binding() { Path = "IsChecked" },
[!ToolBar.OverflowModeProperty] = new Binding(){Path = nameof(ToolBarItemViewModel.OverflowMode)},
};
}
if (param is ToolBarComboBoxItemViewModel combo)
{
return new ComboBox()
{
[!ContentControl.ContentProperty] = new Binding() { Path = "Content" },
[!SelectingItemsControl.SelectedItemProperty] = new Binding() { Path = "SelectedItem" },
[!ItemsControl.ItemsSourceProperty] = new Binding() { Path = "Items" },
[!ToolBar.OverflowModeProperty] = new Binding(){Path = nameof(ToolBarItemViewModel.OverflowMode)},
};
}
return new Button() { Content = "Undefined Item" };
}

public bool Match(object? data)
{
return data is ToolBarItemViewModel;
}
}
45 changes: 45 additions & 0 deletions demo/Ursa.Demo/Dialogs/DialogWithAction.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<UserControl
x:Class="Ursa.Demo.Dialogs.DialogWithAction"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ursa.Demo.Dialogs"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="local:DialogWithActionViewModel"
Background="{DynamicResource SemiYellow1}"
mc:Ignorable="d">
<Grid Margin="24" RowDefinitions="Auto, *, Auto">
<TextBlock
Grid.Row="0"
Margin="8"
FontSize="16"
FontWeight="600"
Text="{Binding Title}" />
<Calendar
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
SelectedDate="{Binding Date}" />
<StackPanel
Grid.Row="2"
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="8">
<Rectangle Width="10" Height="10" Fill="Red" u:DialogControlBase.CanClose="True"></Rectangle>
<Button Command="{Binding DialogCommand}" Content="Dialog" />
<Button Command="{Binding OKCommand}" Content="OK" />
<Button Command="{Binding CancelCommand}" Content="Cancel" />
<ComboBox>
<ComboBoxItem>A</ComboBoxItem>
<ComboBoxItem>B</ComboBoxItem>
<ComboBoxItem>C</ComboBoxItem>
</ComboBox>
</StackPanel>
</Grid>
</UserControl>
13 changes: 13 additions & 0 deletions demo/Ursa.Demo/Dialogs/DialogWithAction.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace Ursa.Demo.Dialogs;

public partial class DialogWithAction : UserControl
{
public DialogWithAction()
{
InitializeComponent();
}
}
Loading
Loading