├── Beam.Animation
├── _Imports.razor
├── Beam.Animation.csproj
├── Properties
│ └── launchSettings.json
├── Javascript.cs
├── AnimatedBeam.razor
└── wwwroot
│ └── animation.js
├── global.json
├── .devcontainer
├── on-create.sh
├── Dockerfile
├── docker-compose.yml
└── devcontainer.json
├── Beam.Client
├── wwwroot
│ ├── css
│ │ ├── open-iconic
│ │ │ ├── font
│ │ │ │ ├── fonts
│ │ │ │ │ ├── open-iconic.eot
│ │ │ │ │ ├── open-iconic.otf
│ │ │ │ │ ├── open-iconic.ttf
│ │ │ │ │ ├── open-iconic.woff
│ │ │ │ │ └── open-iconic.svg
│ │ │ │ └── css
│ │ │ │ │ └── open-iconic-bootstrap.min.css
│ │ │ ├── ICON-LICENSE
│ │ │ ├── README.md
│ │ │ └── FONT-LICENSE
│ │ └── app.css
│ └── index.html
├── Pages
│ ├── Index.razor
│ ├── Card.razor
│ ├── FetchData.razor
│ ├── Settings.razor
│ ├── User.razor
│ ├── FrequencyList.razor.css
│ ├── RayList.razor
│ ├── RayItem.razor
│ ├── RayInput.razor
│ └── FrequencyList.razor
├── Shared
│ ├── UserLayout.razor
│ ├── MainLayout.razor
│ ├── NavPanel.razor
│ ├── NavMenu.razor.css
│ ├── NavPanel.razor.css
│ ├── NavMenu.razor
│ └── MainLayout.razor.css
├── _Imports.razor
├── App.razor
├── Program.cs
├── Beam.Client.csproj
├── Properties
│ └── launchSettings.json
└── Services
│ ├── BeamApiService.cs
│ └── DataService.cs
├── Beam.Server
├── appsettings.json
├── Mappers
│ ├── UserMapper.cs
│ ├── PrismMapper.cs
│ ├── FrequencyMapper.cs
│ └── RayMapper.cs
├── Program.cs
├── Controllers
│ ├── UserController.cs
│ ├── FrequencyController.cs
│ ├── PrismController.cs
│ └── RayController.cs
├── Beam.Server.csproj
└── Properties
│ └── launchSettings.json
├── Beam.Shared
├── Beam.Shared.csproj
├── User.cs
├── Prism.cs
├── Frequency.cs
├── FrequencyItem.cs
├── RayItem.cs
└── Ray.cs
├── .config
└── dotnet-tools.json
├── SECURITY.md
├── Beam.Data
├── Configure.cs
├── Beam.Data.csproj
├── BeamContext.cs
└── Migrations
│ ├── BeamContextModelSnapshot.cs
│ ├── 20190610152053_InitialCreate.Designer.cs
│ └── 20190610152053_InitialCreate.cs
├── README.md
├── .vscode
├── launch.json
└── tasks.json
├── .github
└── workflows
│ ├── docker-image.yml
│ └── codeql-analysis.yml
├── .gitattributes
├── Beam.sln
└── .gitignore
/Beam.Animation/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using Microsoft.AspNetCore.Components.Web
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "6.0.201",
4 | "rollForward": "latestFeature"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/.devcontainer/on-create.sh:
--------------------------------------------------------------------------------
1 | cd /workspace
2 | dotnet restore
3 | cd Beam.Server
4 | dotnet tool restore
5 | dotnet ef database update
6 | dotnet dev-certs https
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dedac/Beam/HEAD/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dedac/Beam/HEAD/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dedac/Beam/HEAD/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dedac/Beam/HEAD/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/Beam.Client/Pages/Index.razor:
--------------------------------------------------------------------------------
1 | @page "/"
2 |
Welcome to BEAM
3 |
4 |
5 |
6 | Select a Frequency, or create a new one
7 |
--------------------------------------------------------------------------------
/Beam.Server/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "DefaultConnection": "Data Source=sql;Initial Catalog=Beam;Integrated Security=False;User ID=sa;Password=@#^!fcIen&*asd"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/Beam.Shared/Beam.Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | 7.3
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.config/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "dotnet-ef": {
6 | "version": "6.0.0",
7 | "commands": [
8 | "dotnet-ef"
9 | ]
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/Beam.Client/Shared/UserLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 | @layout MainLayout
3 | @inject DataService data
4 |
5 |
7 | See Myself
8 |
9 | @Body
--------------------------------------------------------------------------------
/Beam.Shared/User.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Beam.Shared
6 | {
7 | public class User
8 | {
9 | public int Id { get; set; }
10 | public string Name { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Beam.Shared/Prism.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Beam.Shared
6 | {
7 | public class Prism
8 | {
9 | public int RayId { get; set; }
10 | public int UserId { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Beam.Shared/Frequency.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Beam.Shared
6 | {
7 | public class Frequency
8 | {
9 | public int Id { get; set; }
10 | public string Name { get; set;}
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Beam.Shared/FrequencyItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Beam.Shared
6 | {
7 | public class FrequencyItem
8 | {
9 | public int Id { get; set; }
10 | public string Name { get; set;}
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Beam.Client/Pages/Card.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | @ChildContent
5 |
6 |
7 |
8 | @code {
9 | [Parameter]
10 | public RenderFragment? ChildContent { get; set; }
11 |
12 | [Parameter]
13 | public string? Title { get; set; }
14 | }
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 | Literally none, this is a demo app.
5 |
6 | ## Reporting a Vulnerability
7 | If you see a vulnerability that you want to report, create an issue so that we can figure out why you are using this for something dangerous.
8 | You can expect an update when I get around to it.
9 | Thanks!
10 |
--------------------------------------------------------------------------------
/Beam.Client/Shared/MainLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | @Body
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Beam.Shared/RayItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Beam.Shared
6 | {
7 | public class RayItem
8 | {
9 | public int RayId { get; set; }
10 | public string Text { get; set; }
11 | public string UserName { get; set; }
12 | public int PrismCount { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Beam.Client/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System
2 | @using System.Net.Http
3 | @using System.Net.Http.Json
4 | @using Microsoft.AspNetCore.Components.Forms
5 | @using Microsoft.AspNetCore.Components.Routing
6 | @using Microsoft.AspNetCore.Components.Web
7 | @using Microsoft.AspNetCore.Components.Web.Virtualization
8 | @using Microsoft.JSInterop
9 | @using Beam.Client
10 | @using Beam.Client.Shared
11 | @using Beam.Client.Services
12 | @using Beam.Animation
--------------------------------------------------------------------------------
/Beam.Data/Configure.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.EntityFrameworkCore;
2 | using Microsoft.Extensions.DependencyInjection;
3 |
4 | namespace Beam.Data
5 | {
6 | public static class Configure
7 | {
8 | public static void ConfigureData(this IServiceCollection services, string connectionString)
9 | {
10 | services.AddDbContext(options => options.UseSqlServer(connectionString));
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Beam.Animation/Beam.Animation.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Beam.Shared/Ray.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Beam.Shared
4 | {
5 | public class Ray
6 | {
7 | public int RayId { get; set; }
8 | public int FrequencyId { get; set; }
9 | public string Text { get; set; }
10 | public int UserId { get; set; }
11 | public string UserName { get; set; }
12 | public int PrismCount { get; set; }
13 | public List UsersPrismed { get; set; } = new List();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Beam.Client/App.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Darkness!
8 |
9 | Sorry, The light has gone out!
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Blazor Beams!
2 | ### A Demo Application for Blazor, The best/worst pun-focused social media application ever. ###
3 |
4 | - Blazor WebAssembly Client
5 | - Hosted in ASP.Net core, with a Web Api backend
6 | - SQL Server Database
7 | - EF Core
8 | - dotnet 6
9 |
10 | Develop, Build and Run in a container locally (with docker desktop and the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension or in [Codespaces](https://github.com/features/codespaces) - Now prebuilt!
11 |
--------------------------------------------------------------------------------
/Beam.Data/Beam.Data.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Beam.Server/Mappers/UserMapper.cs:
--------------------------------------------------------------------------------
1 | namespace Beam.Server.Mappers
2 | {
3 | public static class UserMapper
4 | {
5 | public static Shared.User ToShared(this Data.User u)
6 | {
7 | return new Shared.User()
8 | {
9 | Id = u.UserId,
10 | Name = u.Username
11 | };
12 | }
13 | public static Data.User ToData(this Shared.User u)
14 | {
15 | return new Data.User()
16 | {
17 | UserId = u.Id,
18 | Username = u.Name
19 | };
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Beam.Client/Pages/FetchData.razor:
--------------------------------------------------------------------------------
1 | @using Beam.Shared
2 | @page "/fetchdata"
3 | @inject HttpClient Http
4 |
5 | @if (frequencies == null)
6 | {
7 | Loading...
8 | }
9 | else
10 | {
11 |
12 | @foreach (var frequency in frequencies)
13 | {
14 |
15 | @frequency.Name
16 |
17 | }
18 |
19 | }
20 |
21 | @code {
22 | FrequencyItem[]? frequencies;
23 |
24 | protected override async Task OnInitializedAsync()
25 | {
26 | frequencies = await Http.GetFromJsonAsync("api/Frequency/All");
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/Beam.Server/Mappers/PrismMapper.cs:
--------------------------------------------------------------------------------
1 | namespace Beam.Server.Mappers
2 | {
3 | public static class PrismMapper
4 | {
5 | public static Shared.Prism ToShared(this Data.Prism p)
6 | {
7 | return new Shared.Prism()
8 | {
9 | RayId = p.RayId,
10 | UserId = p.UserId
11 | };
12 | }
13 | public static Data.Prism ToData(this Shared.Prism p)
14 | {
15 | return new Data.Prism()
16 | {
17 | RayId = p.RayId,
18 | UserId = p.UserId
19 | };
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Beam.Server/Mappers/FrequencyMapper.cs:
--------------------------------------------------------------------------------
1 | namespace Beam.Server.Mappers
2 | {
3 | public static class FrequencyMapper
4 | {
5 | public static Shared.Frequency ToShared(this Data.Frequency f)
6 | {
7 | return new Shared.Frequency()
8 | {
9 | Id = f.FrequencyId,
10 | Name = f.Name
11 | };
12 | }
13 | public static Data.Frequency ToData(this Shared.Frequency f)
14 | {
15 | return new Data.Frequency()
16 | {
17 | FrequencyId = f.Id,
18 | Name = f.Name
19 | };
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Beam.Client/Pages/Settings.razor:
--------------------------------------------------------------------------------
1 | @page "/settings"
2 | @inject DataService data
3 |
4 | Username
5 |
11 |
12 |
13 | @code{
14 | private string name = "";
15 |
16 | protected override void OnInitialized()
17 | {
18 | name = data.CurrentUser.Name;
19 | }
20 | async Task UpdateUser()
21 | {
22 | await data.GetOrCreateUser(name);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Beam.Client/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components.Web;
2 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
3 | using Beam.Client;
4 | using Beam.Client.Services;
5 |
6 | var builder = WebAssemblyHostBuilder.CreateDefault(args);
7 | builder.RootComponents.Add("#app");
8 | builder.RootComponents.Add("head::after");
9 |
10 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
11 |
12 | builder.Services.AddScoped();
13 | builder.Services.AddScoped();
14 | builder.Services.AddSingleton();
15 | await builder.Build().RunAsync();
16 |
--------------------------------------------------------------------------------
/Beam.Client/Pages/User.razor:
--------------------------------------------------------------------------------
1 | @layout UserLayout
2 | @page "/User/{name}"
3 |
4 | @using Beam.Shared
5 | @inject DataService data
6 |
7 | User Rays
8 |
9 | @foreach (var ray in Rays)
10 | {
11 |
12 |
13 |
14 |
15 | }
16 | @code {
17 | [Parameter]
18 | public string? Name { get; set; }
19 |
20 | List Rays = new List();
21 |
22 | protected override void OnParametersSet()
23 | {
24 | data.UpdatedRays += UpdateUserRays;
25 | UpdateUserRays();
26 | }
27 |
28 | async void UpdateUserRays()
29 | {
30 | Rays = await data.GetUserRays(Name ?? "");
31 | StateHasChanged();
32 | }
33 | }
--------------------------------------------------------------------------------
/Beam.Client/Pages/FrequencyList.razor.css:
--------------------------------------------------------------------------------
1 | .nav-item ::deep {
2 | font-size: 0.9rem;
3 | padding-bottom: 0.5rem;
4 | }
5 |
6 | .nav-item:first-of-type {
7 | padding-top: 1rem;
8 | }
9 |
10 | .nav-item:last-of-type {
11 | padding-bottom: 1rem;
12 | }
13 |
14 | .nav-item ::deep a {
15 | color: #d7d7d7;
16 | border-radius: 4px;
17 | height: 3rem;
18 | display: flex;
19 | align-items: center;
20 | line-height: 3rem;
21 | }
22 |
23 | .nav-item ::deep a.active {
24 | background-color: rgba(255,255,255,0.25);
25 | color: white;
26 | }
27 |
28 | .nav-item ::deep a:hover {
29 | background-color: rgba(255,255,255,0.1);
30 | color: white;
31 | }
--------------------------------------------------------------------------------
/Beam.Animation/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:49756/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Beam.Animation": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:49757/"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Beam.Server/Program.cs:
--------------------------------------------------------------------------------
1 | using Beam.Data;
2 |
3 | var builder = WebApplication.CreateBuilder(args);
4 |
5 | // Add services to the container.
6 | builder.Services.AddControllersWithViews();
7 | builder.Services.AddRazorPages();
8 | builder.Services.ConfigureData(builder.Configuration.GetConnectionString("DefaultConnection"));
9 |
10 | var app = builder.Build();
11 |
12 | if (app.Environment.IsDevelopment())
13 | {
14 | app.UseWebAssemblyDebugging();
15 | }
16 | else
17 | {
18 | app.UseExceptionHandler("/Error");
19 | app.UseHsts();
20 | }
21 |
22 | app.UseHttpsRedirection();
23 | app.UseBlazorFrameworkFiles();
24 | app.UseStaticFiles();
25 |
26 | app.UseRouting();
27 |
28 | app.MapRazorPages();
29 | app.MapControllers();
30 | app.MapFallbackToFile("index.html");
31 | app.Run();
--------------------------------------------------------------------------------
/Beam.Client/Beam.Client.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net6.0
4 | enable
5 | enable
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Beam.Animation/Javascript.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.JSInterop;
2 | using System;
3 | using System.Threading.Tasks;
4 |
5 | namespace Beam.Animation
6 | {
7 | public class Javascript
8 | {
9 | private IJSRuntime _jsRuntime;
10 | public Javascript(IJSRuntime jsRuntime)
11 | {
12 | _jsRuntime = jsRuntime;
13 | }
14 |
15 | public static event Action? BeamPassTriggered;
16 | public ValueTask LoadAnimation(string elementId, int width, int height)
17 | {
18 | return _jsRuntime.InvokeAsync
19 | ("animatedBeam.loadAnimation", elementId, width, height);
20 | }
21 |
22 | [JSInvokable]
23 | public static Task BeamPassedBy()
24 | {
25 | return Task.Run(() => BeamPassTriggered?.Invoke());
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Beam.Animation/AnimatedBeam.razor:
--------------------------------------------------------------------------------
1 | @implements IDisposable
2 | @inject Javascript _javascript
3 |
4 | You Watched The Beam @beamPasses Times
5 |
6 | @code{
7 |
8 | int beamPasses = 0;
9 | //bool animationInitialized = false;
10 |
11 | void IncrementBeamPass()
12 | {
13 | beamPasses++;
14 | StateHasChanged();
15 | }
16 |
17 | protected override void OnAfterRender(bool firstRender)
18 | {
19 | base.OnAfterRender(firstRender);
20 | if (firstRender)
21 | {
22 | Javascript.BeamPassTriggered += IncrementBeamPass;
23 | _javascript.LoadAnimation("animationHost", 1000, 200);
24 | //animationInitialized = true;
25 | }
26 | }
27 |
28 | public void Dispose()
29 | {
30 | Javascript.BeamPassTriggered -= IncrementBeamPass;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.devcontainer/Dockerfile:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------------------------------------
2 | # Copyright (c) Microsoft Corporation. All rights reserved.
3 | # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4 | #-------------------------------------------------------------------------------------------------------------
5 | FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
6 | RUN apt-get update && apt-get install -y gnupg2
7 | RUN curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | apt-key add -
8 | RUN curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | tee /etc/apt/sources.list.d/msprod.list
9 | RUN apt-get update
10 | #mssql tools isn't available for arm64 / aarch64
11 | RUN if [ $(arch) != "aarch64" ]; then ACCEPT_EULA=Y apt-get install mssql-tools unixodbc-dev -y; fi
--------------------------------------------------------------------------------
/Beam.Client/Pages/RayList.razor:
--------------------------------------------------------------------------------
1 | @page "/frequency/{id}"
2 | @inject DataService data
3 |
4 |
5 |
6 | @foreach (var ray in data.Rays)
7 | {
8 |
9 |
10 |
11 | }
12 |
13 |
14 | @code{
15 | [Parameter]
16 | public string Id { get; set; } = "";
17 |
18 | public string newRayText { get; set; } = "";
19 |
20 | protected override void OnParametersSet()
21 | {
22 | data.UpdatedRays += StateHasChanged;
23 | data.UpdatedRays += UpdateNewRayText;
24 | data.SelectedFrequency = Int32.Parse(Id);
25 | UpdateNewRayText();
26 | }
27 |
28 | void UpdateNewRayText()
29 | {
30 | if (!data.Rays.Any(r => r.UserName == data.CurrentUser.Name))
31 | {
32 | newRayText = $"Hello, My Name is {data.CurrentUser.Name}";
33 | }
34 | }
35 |
36 |
37 | }
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Blazor Beams!
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Loading...
16 |
17 | An unhandled error has occurred.
18 |
Reload
19 |
🗙
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Beam.Client/Pages/RayItem.razor:
--------------------------------------------------------------------------------
1 | @inject DataService data
2 |
3 |
4 | @if (!ray.UsersPrismed.Contains(data.CurrentUser.Name))
5 | {
6 | data.PrismRay(ray.RayId))">
7 | @ray.PrismCount
8 |
9 | }
10 | else
11 | {
12 | data.UnPrismRay(ray.RayId))">
13 | @ray.PrismCount
14 |
15 | }
16 | "@ray.Text"
17 |
18 |
19 | - @ray.UserName
20 |
21 |
22 | @code{
23 | [Parameter]
24 | public Beam.Shared.Ray ray { get; set; } = new Beam.Shared.Ray();
25 | }
26 |
--------------------------------------------------------------------------------
/Beam.Client/Pages/RayInput.razor:
--------------------------------------------------------------------------------
1 | @inject DataService data
2 |
3 |
4 |
11 |
12 |
13 |
14 | @code{
15 | [Parameter]
16 | public string newRayText { get; set; } = "";
17 |
18 | [Parameter]
19 | public Action? newRayTextChanged { get; set; }
20 |
21 | async Task CastRay()
22 | {
23 | await data.CreateRay(newRayText);
24 | newRayText = "";
25 | }
26 |
27 | void ClearText()
28 | {
29 | newRayText = "";
30 |
31 | }
32 | }
--------------------------------------------------------------------------------
/Beam.Client/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:1868/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
15 | "environmentVariables": {
16 | "ASPNETCORE_ENVIRONMENT": "Development"
17 | }
18 | },
19 | "Beam.Client": {
20 | "commandName": "Project",
21 | "launchBrowser": true,
22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
23 | "environmentVariables": {
24 | "ASPNETCORE_ENVIRONMENT": "Development"
25 | },
26 | "applicationUrl": "http://localhost:1869/"
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Beam.Server/Controllers/UserController.cs:
--------------------------------------------------------------------------------
1 | using Beam.Server.Mappers;
2 | using Beam.Shared;
3 | using Microsoft.AspNetCore.Mvc;
4 | using System.Linq;
5 |
6 | namespace Beam.Server.Controllers
7 | {
8 | [Route("api/[controller]")]
9 | [ApiController]
10 | public class UserController : ControllerBase
11 | {
12 | Data.BeamContext _context;
13 | public UserController(Data.BeamContext context)
14 | {
15 | _context = context;
16 | }
17 |
18 | [HttpGet("[action]/{Username}")]
19 | public User Get(string Username)
20 | {
21 | var existingUser = _context.Users.FirstOrDefault(u => u.Username == Username);
22 |
23 | if (existingUser != null) return existingUser.ToShared();
24 |
25 | var newUser = new Data.User() { Username = Username };
26 |
27 | _context.Add(newUser);
28 | _context.SaveChanges();
29 |
30 | return newUser.ToShared();
31 | }
32 |
33 | }
34 | }
--------------------------------------------------------------------------------
/Beam.Server/Mappers/RayMapper.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 |
3 | namespace Beam.Server.Mappers
4 | {
5 | public static class RayMapper
6 | {
7 | public static Shared.Ray ToShared(this Data.Ray r)
8 | {
9 | return new Shared.Ray()
10 | {
11 | RayId = r.RayId,
12 | Text = r.Text,
13 | FrequencyId = r.FrequencyId,
14 | PrismCount = r.Prisms.Count,
15 | UserId = r.UserId ?? 0,
16 | UserName = r.User?.Username ?? "[missing]",
17 | UsersPrismed = r.Prisms.Select(p => p.User.Username).ToList()
18 | };
19 | }
20 | public static Data.Ray ToData(this Shared.Ray r)
21 | {
22 | return new Data.Ray()
23 | {
24 | RayId = r.RayId,
25 | Text = r.Text,
26 | FrequencyId = r.FrequencyId,
27 | UserId = r.UserId,
28 | };
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Beam.Server/Beam.Server.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 | all
14 | runtime; build; native; contentfiles; analyzers; buildtransitive
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Beam.Client/Shared/NavPanel.razor:
--------------------------------------------------------------------------------
1 |
9 |
10 |
20 |
21 | @code {
22 | private bool collapseNavMenu = true;
23 |
24 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
25 |
26 | private void ToggleNavMenu()
27 | {
28 | collapseNavMenu = !collapseNavMenu;
29 | }
30 | }
--------------------------------------------------------------------------------
/Beam.Server/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:5000/",
7 | "sslPort": 5001
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
15 | "environmentVariables": {
16 | "ASPNETCORE_ENVIRONMENT": "Development"
17 | }
18 | },
19 | "Beam.Server": {
20 | "commandName": "Project",
21 | "dotnetRunMessages": true,
22 | "launchBrowser": true,
23 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
24 | "environmentVariables": {
25 | "ASPNETCORE_ENVIRONMENT": "Development"
26 | },
27 | "applicationUrl": "http://localhost:5000/",
28 | "sslPort":5001
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/.devcontainer/docker-compose.yml:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------------------------------------
2 | # Copyright (c) Microsoft Corporation. All rights reserved.
3 | # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4 | #-------------------------------------------------------------------------------------------------------------
5 |
6 | version: '3'
7 | services:
8 | sql:
9 | image: "mcr.microsoft.com/azure-sql-edge"
10 | container_name: beamdb
11 | environment:
12 | #Never open your dev env sql container publicly
13 | MSSQL_SA_PASSWORD: "@#^!fcIen&*asd"
14 | ACCEPT_EULA: "1"
15 | beam:
16 | build:
17 | context: .
18 | container_name: beam
19 | volumes:
20 | # Update this to wherever you want VS Code to mount the folder of your project
21 | - ..:/workspace:cached
22 |
23 | # Overrides default command so things don't shut down after the process ends.
24 | command: /bin/sh -c "while sleep 1000; do :; done"
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/app.css:
--------------------------------------------------------------------------------
1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
2 |
3 | html, body {
4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
5 | }
6 |
7 | a, .btn-link {
8 | color: #0366d6;
9 | }
10 |
11 | .btn-primary {
12 | color: #fff;
13 | background-color: #1b6ec2;
14 | border-color: #1861ac;
15 | }
16 |
17 | .content {
18 | padding-top: 1.1rem;
19 | }
20 |
21 | .valid.modified:not([type=checkbox]) {
22 | outline: 1px solid #26b050;
23 | }
24 |
25 | .invalid {
26 | outline: 1px solid red;
27 | }
28 |
29 | .validation-message {
30 | color: red;
31 | }
32 |
33 | #blazor-error-ui {
34 | background: lightyellow;
35 | bottom: 0;
36 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
37 | display: none;
38 | left: 0;
39 | padding: 0.6rem 1.25rem 0.7rem 1.25rem;
40 | position: fixed;
41 | width: 100%;
42 | z-index: 1000;
43 | }
44 |
45 | #blazor-error-ui .dismiss {
46 | cursor: pointer;
47 | position: absolute;
48 | right: 0.75rem;
49 | top: 0.5rem;
50 | }
--------------------------------------------------------------------------------
/Beam.Server/Controllers/FrequencyController.cs:
--------------------------------------------------------------------------------
1 | using Beam.Shared;
2 | using Microsoft.AspNetCore.Mvc;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using Beam.Server.Mappers;
6 |
7 | namespace Beam.Server.Controllers
8 | {
9 | [Route("api/[controller]")]
10 | [ApiController]
11 | public class FrequencyController : ControllerBase
12 | {
13 | Data.BeamContext _context;
14 | public FrequencyController(Data.BeamContext context)
15 | {
16 | _context = context;
17 | }
18 |
19 | [HttpGet("[action]")]
20 | public List All()
21 | {
22 | return _context.Frequencies.Select(r => r.ToShared()).ToList();
23 | }
24 |
25 | [HttpPost("[action]")]
26 | public List Add([FromBody] Frequency frequency)
27 | {
28 | _context.Add(new Data.Frequency() { Name = frequency.Name });
29 | _context.SaveChanges();
30 | return _context.Frequencies.Select(r => r.ToShared()).ToList();
31 | }
32 |
33 | }
34 | }
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Beam.Client/Pages/FrequencyList.razor:
--------------------------------------------------------------------------------
1 | @inject DataService data
2 |
3 | @if (data.Frequencies != null)
4 | {
5 | @foreach (var frequency in data.Frequencies)
6 | {
7 |
8 |
9 |
10 | @frequency.Name
11 |
12 |
13 | }
14 | }
15 |
23 |
24 | @code
25 | {
26 | private string name = "";
27 | protected override void OnInitialized()
28 | {
29 | data.UdpatedFrequencies += StateHasChanged;
30 | data.GetFrequencies().ConfigureAwait(false);
31 | }
32 |
33 | void AddFrequencyClick()
34 | {
35 | data.AddFrequency(name).ConfigureAwait(false);
36 | name = "";
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to find out which attributes exist for C# debugging
3 | // Use hover for the description of the existing attributes
4 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (web)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | "program": "${workspaceFolder}/Beam.Server/bin/Debug/net6.0/Beam.Server.dll",
13 | "args": [],
14 | "cwd": "${workspaceFolder}/Beam.Server",
15 | "stopAtEntry": false,
16 | "serverReadyAction": {
17 | "action": "openExternally",
18 | "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
19 | },
20 | "env": {
21 | "ASPNETCORE_ENVIRONMENT": "Development"
22 | },
23 | "sourceFileMap": {
24 | "/Views": "${workspaceFolder}/Beam.Server/Views"
25 | }
26 | },
27 | {
28 | "type": "blazorwasm",
29 | "request": "attach",
30 | "name": "Attach and Debug WASM"
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/Beam.Client/Shared/NavMenu.razor.css:
--------------------------------------------------------------------------------
1 | .navbar-toggler {
2 | background-color: rgba(255, 255, 255, 0.1);
3 | }
4 |
5 | .top-row {
6 | height: 3.5rem;
7 | background-color: rgba(0,0,0,0.4);
8 | }
9 |
10 | .navbar-brand {
11 | font-size: 1.1rem;
12 | }
13 |
14 | .oi {
15 | width: 2rem;
16 | font-size: 1.1rem;
17 | vertical-align: text-top;
18 | top: -2px;
19 | }
20 |
21 | .nav-item {
22 | font-size: 0.9rem;
23 | padding-bottom: 0.5rem;
24 | }
25 |
26 | .nav-item:first-of-type {
27 | padding-top: 1rem;
28 | }
29 |
30 | .nav-item:last-of-type {
31 | padding-bottom: 1rem;
32 | }
33 |
34 | .nav-item ::deep a {
35 | color: #d7d7d7;
36 | border-radius: 4px;
37 | height: 3rem;
38 | display: flex;
39 | align-items: center;
40 | line-height: 3rem;
41 | }
42 |
43 | .nav-item ::deep a.active {
44 | background-color: rgba(255,255,255,0.25);
45 | color: white;
46 | }
47 |
48 | .nav-item ::deep a:hover {
49 | background-color: rgba(255,255,255,0.1);
50 | color: white;
51 | }
52 |
53 | @media (min-width: 768px) {
54 | .navbar-toggler {
55 | display: none;
56 | }
57 |
58 | .collapse {
59 | /* Never collapse the sidebar for wide screens */
60 | display: block;
61 | }
62 | }
--------------------------------------------------------------------------------
/.github/workflows/docker-image.yml:
--------------------------------------------------------------------------------
1 | name: Docker Image CI
2 |
3 | on:
4 | workflow_dispatch:
5 | inputs:
6 | version:
7 | type: text
8 | required: true
9 |
10 | jobs:
11 | build-publish:
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 | - uses: docker/login-action@v1.14.1
17 | with:
18 | registry: ghcr.io
19 | username: ${{ github.actor }}
20 | password: ${{ secrets.GITHUB_TOKEN }}
21 |
22 | - name: Lowercase the repo name
23 | run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
24 |
25 | - name: docker compose
26 | run: |
27 | VERSION="${{ github.event.inputs.version }}"
28 | echo '::set-output name=semver::$(echo $VERSION)'
29 | echo "VERSION=$VERSION" >> $GITHUB_ENV
30 | VERSION=$VERSION docker-compose -f .devcontainer/docker-compose.yml up --no-start --remove-orphans
31 |
32 | - name: tag and push
33 | run: |
34 | TAG="ghcr.io/${{ env.REPO }}/beamdb:${{github.event.inputs.version}}"
35 | docker tag "mcr.microsoft.com/azure-sql-edge" $TAG
36 | docker push $TAG
37 |
38 | TAG="ghcr.io/${{ env.REPO }}/beam:${{github.event.inputs.version}}"
39 | docker tag "devcontainer_beam" $TAG
40 | docker push $TAG
41 |
--------------------------------------------------------------------------------
/Beam.Client/Shared/NavPanel.razor.css:
--------------------------------------------------------------------------------
1 | .navbar-toggler {
2 | background-color: rgba(255, 255, 255, 0.1);
3 | }
4 |
5 | .top-row {
6 | height: 3.5rem;
7 | background-color: rgba(0,0,0,0.4);
8 | }
9 |
10 | .navbar-brand {
11 | font-size: 1.1rem;
12 | }
13 |
14 | .oi {
15 | width: 2rem;
16 | font-size: 1.1rem;
17 | vertical-align: text-top;
18 | top: -2px;
19 | }
20 |
21 | .nav-item ::deep {
22 | font-size: 0.9rem;
23 | padding-bottom: 0.5rem;
24 | }
25 |
26 | .nav-item:first-of-type {
27 | padding-top: 1rem;
28 | }
29 |
30 | .nav-item:last-of-type {
31 | padding-bottom: 1rem;
32 | }
33 |
34 | .nav-item ::deep a {
35 | color: #d7d7d7;
36 | border-radius: 4px;
37 | height: 3rem;
38 | display: flex;
39 | align-items: center;
40 | line-height: 3rem;
41 | }
42 |
43 | .nav-item ::deep a.active {
44 | background-color: rgba(255,255,255,0.25);
45 | color: white;
46 | }
47 |
48 | .nav-item ::deep a:hover {
49 | background-color: rgba(255,255,255,0.1);
50 | color: white;
51 | }
52 |
53 | @media (min-width: 768px) {
54 | .navbar-toggler {
55 | display: none;
56 | }
57 |
58 | .collapse {
59 | /* Never collapse the sidebar for wide screens */
60 | display: block;
61 | }
62 | }
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/Beam.Server/Beam.Server.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/Beam.Server/Beam.Server.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/Beam.Server/Beam.Server.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/Beam.Client/Shared/NavMenu.razor:
--------------------------------------------------------------------------------
1 |
9 |
10 |
29 |
30 | @code {
31 | private bool collapseNavMenu = true;
32 |
33 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
34 |
35 | private void ToggleNavMenu()
36 | {
37 | collapseNavMenu = !collapseNavMenu;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Beam.Client/Shared/MainLayout.razor.css:
--------------------------------------------------------------------------------
1 | .page {
2 | position: relative;
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | .main {
8 | flex: 1;
9 | }
10 |
11 | .sidebar {
12 | background-image: linear-gradient(180deg, rgb(214, 45, 45) 0%, #202020 70%);
13 | }
14 |
15 | .top-row {
16 | background-color: #f7f7f7;
17 | border-bottom: 1px solid #d6d5d5;
18 | justify-content: flex-end;
19 | height: 3.5rem;
20 | display: flex;
21 | align-items: center;
22 | }
23 |
24 | .top-row ::deep a, .top-row .btn-link {
25 | white-space: nowrap;
26 | margin-left: 1.5rem;
27 | }
28 |
29 | .top-row a:first-child {
30 | overflow: hidden;
31 | text-overflow: ellipsis;
32 | }
33 |
34 | @media (max-width: 767.98px) {
35 | .top-row:not(.auth) {
36 | display: none;
37 | }
38 |
39 | .top-row.auth {
40 | justify-content: space-between;
41 | }
42 |
43 | .top-row a, .top-row .btn-link {
44 | margin-left: 0;
45 | }
46 | }
47 |
48 | @media (min-width: 768px) {
49 | .page {
50 | flex-direction: row;
51 | }
52 |
53 | .sidebar {
54 | width: 250px;
55 | height: 100vh;
56 | position: sticky;
57 | top: 0;
58 | }
59 |
60 | .top-row {
61 | position: sticky;
62 | top: 0;
63 | z-index: 1;
64 | }
65 |
66 | .main > div {
67 | padding-left: 2rem !important;
68 | padding-right: 1.5rem !important;
69 | }
70 | }
--------------------------------------------------------------------------------
/Beam.Data/BeamContext.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.EntityFrameworkCore;
2 | using System.Collections.Generic;
3 |
4 | namespace Beam.Data
5 | {
6 | public class BeamContext : DbContext
7 | {
8 | public BeamContext(DbContextOptions contextOptions) : base(contextOptions) { }
9 |
10 | public DbSet Frequencies { get; set; }
11 | public DbSet Rays { get; set; }
12 | public DbSet Users { get; set; }
13 | public DbSet Prisms { get; set; }
14 |
15 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
16 | {
17 | }
18 | }
19 |
20 | public class Frequency
21 | {
22 | public int FrequencyId { get; set; }
23 | public string Name { get; set; }
24 | public List Rays { get; set;}
25 | }
26 |
27 | public class User
28 | {
29 | public int UserId { get; set; }
30 | public string Username { get; set; }
31 | public List Rays { get; set; }
32 | public List Prisms { get; set; }
33 | }
34 |
35 | public class Ray
36 | {
37 | public int RayId { get; set; }
38 | public string Text { get; set; }
39 | public int FrequencyId { get; set; }
40 | public Frequency Frequency { get; set; }
41 | public List Prisms { get; set; }
42 | public int? UserId { get; set; }
43 | public User User { get; set; }
44 | }
45 |
46 | public class Prism
47 | {
48 | public int PrismId { get; set; }
49 | public int UserId { get; set; }
50 | public User User { get; set; }
51 | public int RayId { get; set; }
52 | public Ray Ray { get; set; }
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | // For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.112.0/containers/docker-existing-docker-compose
3 | // If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
4 | {
5 | "name": "Beam Dev",
6 |
7 | "dockerComposeFile": [
8 | "docker-compose.yml"
9 | ],
10 |
11 | // The 'service' property is the name of the service for the container that VS Code should
12 | // use. Update this value and .devcontainer/docker-compose.yml to the real service name.
13 | "service": "beam",
14 |
15 | // The optional 'workspaceFolder' property is the path VS Code should open by default when
16 | // connected. This is typically a file mount in .devcontainer/docker-compose.yml
17 | "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
18 |
19 | "hostRequirements": {
20 | "cpus": 4,
21 | "memory": "8gb",
22 | "storage": "32gb"
23 | },
24 | // Set *default* container specific settings.json values on container create.
25 | "customizations":{
26 | "vscode": {
27 | "settings": {
28 | "mssql.connections": [
29 | {
30 | "server": "sql",
31 | "database": "Beam",
32 | "authenticationType": "SqlLogin",
33 | "user": "sa",
34 | "password": "@#^!fcIen&*asd",
35 | "emptyPasswordInput": false,
36 | "savePassword": true
37 | }
38 | ]
39 | },
40 |
41 | // Add the IDs of extensions you want installed when the container is created.
42 | "extensions": [
43 | "ms-dotnettools.csharp",
44 | "ms-mssql.mssql",
45 | "ms-dotnettools.blazorwasm-companion"
46 | ]
47 | }
48 | },
49 | "forwardPorts": [ 5000 ],
50 |
51 | "onCreateCommand": "bash .devcontainer/on-create.sh ${containerWorkspaceFolder} > on-create.log 2>&1",
52 |
53 | "features": {
54 | "ghcr.io/devcontainers/features/github-cli:1": {},
55 | "ghcr.io/devcontainers/features/sshd:1": {}
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Beam.Server/Controllers/PrismController.cs:
--------------------------------------------------------------------------------
1 | using Beam.Shared;
2 | using Microsoft.AspNetCore.Mvc;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using Beam.Server.Mappers;
6 | using Microsoft.EntityFrameworkCore;
7 |
8 | namespace Beam.Server.Controllers
9 | {
10 | [Route("api/[controller]")]
11 | [ApiController]
12 | public class PrismController : ControllerBase
13 | {
14 | Data.BeamContext _context;
15 | public PrismController(Data.BeamContext context)
16 | {
17 | _context = context;
18 | }
19 |
20 | [HttpPost("[action]")]
21 | public List Add([FromBody] Prism prism)
22 | {
23 | var newPrism = prism.ToData();
24 |
25 | _context.Add(newPrism);
26 | _context.SaveChanges();
27 |
28 | var prismRay = _context.Rays.Find(newPrism.RayId);
29 |
30 | if (prismRay == null) return new List();
31 |
32 | return _context.Rays.Include(r => r.Prisms).ThenInclude(p => p.User).Include(r => r.User)
33 | .Where(r => r.FrequencyId == prismRay.FrequencyId)
34 | .Select(r => r.ToShared())
35 | .ToList();
36 | }
37 |
38 | [HttpGet("[action]/{UserId}/{RayId}")]
39 | public List Remove(int UserId, int RayId)
40 | {
41 | var removePrisms = _context.Prisms.Include(p => p.Ray).Where(p => p.RayId == RayId && p.UserId == UserId).ToList();
42 | if (removePrisms == null || removePrisms.Count <= 0) return new List();
43 |
44 | var frequencyId = removePrisms.First().Ray.FrequencyId;
45 | _context.RemoveRange(removePrisms);
46 |
47 | _context.SaveChanges();
48 |
49 | return _context.Rays.Include(r => r.Prisms).ThenInclude(p => p.User).Include(r => r.User)
50 | .Where(r => r.FrequencyId == frequencyId)
51 | .Select(r => r.ToShared())
52 | .ToList();
53 | }
54 |
55 | }
56 | }
--------------------------------------------------------------------------------
/Beam.Server/Controllers/RayController.cs:
--------------------------------------------------------------------------------
1 | using Beam.Shared;
2 | using Microsoft.AspNetCore.Mvc;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using Beam.Server.Mappers;
6 | using Microsoft.EntityFrameworkCore;
7 |
8 | namespace Beam.Server.Controllers
9 | {
10 | [Route("api/[controller]")]
11 | [ApiController]
12 | public class RayController : ControllerBase
13 | {
14 | Data.BeamContext _context;
15 | public RayController(Data.BeamContext context)
16 | {
17 | _context = context;
18 | }
19 |
20 | [HttpGet("user/{name}")]
21 | public List GetRaysByUser(string name)
22 | {
23 | return _context.Rays.Include(r => r.Prisms).ThenInclude(p => p.User).Include(r => r.User)
24 | .Where(r => r.User.Username == name)
25 | .Select(r => r.ToShared()).ToList();
26 | }
27 |
28 | [HttpGet("userprisms/{name}")]
29 | public List GetPrismedRaysByUser(string name)
30 | {
31 | return _context.Rays.Include(r => r.Prisms).ThenInclude(p => p.User).Include(r => r.User)
32 | .Where(r => r.Prisms.Any(p => p.User.Username == name))
33 | .Select(r => r.ToShared()).ToList();
34 | }
35 |
36 | [HttpGet("{FrequencyId}")]
37 | public List Rays(int FrequencyId)
38 | {
39 | return GetRays(FrequencyId);
40 | }
41 |
42 | private List GetRays(int FrequencyId)
43 | {
44 | return _context.Rays.Include(r => r.Prisms).ThenInclude(p => p.User).Include(r => r.User)
45 | .Where(r => r.FrequencyId == FrequencyId)
46 | .Select(r => r.ToShared()).ToList();
47 | }
48 |
49 | [HttpPost("[action]")]
50 | public List Add([FromBody] Ray ray)
51 | {
52 | _context.Add(ray.ToData());
53 | _context.SaveChanges();
54 | return GetRays(ray.FrequencyId);
55 | }
56 |
57 | }
58 | }
--------------------------------------------------------------------------------
/Beam.Animation/wwwroot/animation.js:
--------------------------------------------------------------------------------
1 | window.animatedBeam = {
2 | loadAnimation: function (elementId, width, height) {
3 | var renderer, mesh, position, scene, camera;
4 |
5 | position = -1.5;
6 | var element = document.getElementById(elementId);
7 | camera = new THREE.PerspectiveCamera(20, width / height, 0.05, 10);
8 | camera.position.z = 1;
9 |
10 | scene = new THREE.Scene();
11 | scene.background = new THREE.Color(0xffffff);
12 |
13 | var pointLight = new THREE.PointLight(0xffFFFF, .5);
14 | pointLight.position.set(1, 1, 1);
15 | scene.add(pointLight);
16 | var spotLight = new THREE.SpotLight(0xff0000, 1);
17 | spotLight.position.set(0, 0, 10);
18 | var spotLight2 = new THREE.SpotLight(0xff0000, 0.5);
19 | spotLight2.position.set(0, -10, -10);
20 | scene.add(spotLight);
21 | scene.add(spotLight2);
22 |
23 | var geometry = new THREE.BoxGeometry(0.4, 0.03, 0.03);
24 | var material = new THREE.MeshPhongMaterial({
25 | color: 0xF3FFE2,
26 | specular: 0xffffff,
27 | shininess: 100
28 | });
29 |
30 | mesh = new THREE.Mesh(geometry, material);
31 | scene.add(mesh);
32 |
33 | renderer = new THREE.WebGLRenderer({ antialias: true });
34 | renderer.setSize(width, height);
35 | element.appendChild(renderer.domElement);
36 |
37 | animatedBeam.animate(renderer, mesh, position, scene, camera);
38 | },
39 |
40 | animate: function (renderer, mesh, position, scene, camera) {
41 |
42 | requestAnimationFrame(function () { animatedBeam.animate(renderer, mesh, position, scene, camera); });
43 |
44 | mesh.rotation.x += 0.01;
45 | position = position + .01;
46 | if (position >= 1.2) {
47 | position = -1.5;
48 | DotNet.invokeMethodAsync("Beam.Animation", "BeamPassedBy");
49 | }
50 | mesh.position.set(position, 0, 0);
51 | renderer.render(scene, camera);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Beam.Client/Services/BeamApiService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Net.Http;
4 | using System.Net.Http.Json;
5 | using System.Threading.Tasks;
6 | using Beam.Shared;
7 | using Microsoft.AspNetCore.Components;
8 |
9 | namespace Beam.Client.Services
10 | {
11 | public class BeamApiService
12 | {
13 | HttpClient http;
14 | public BeamApiService(HttpClient httpInstance)
15 | {
16 | http = httpInstance;
17 | }
18 |
19 | internal async Task> FrequencyList()
20 | {
21 | return (await http.GetFromJsonAsync>("api/Frequency/All")) ?? new List();
22 | }
23 |
24 | internal async Task> RayList(int frequencyId)
25 | {
26 | return (await http.GetFromJsonAsync>($"api/Ray/{frequencyId}")) ?? new List();
27 | }
28 |
29 | internal async Task> AddFrequency(Frequency frequency)
30 | {
31 | var resp = await http.PostAsJsonAsync("api/Frequency/Add", frequency);
32 | return (await resp.Content.ReadFromJsonAsync>()) ?? new List();
33 | }
34 |
35 | internal async Task> AddRay(Ray ray)
36 | {
37 | var resp = await http.PostAsJsonAsync("api/Ray/Add", ray);
38 | return (await resp.Content.ReadFromJsonAsync>()) ?? new List();
39 | }
40 |
41 | internal async Task GetOrCreateUser(string name)
42 | {
43 | return (await http.GetFromJsonAsync($"api/User/Get/{name}")) ?? new User();
44 | }
45 |
46 | internal async Task> PrismRay(Prism prism)
47 | {
48 | var resp = await http.PostAsJsonAsync("api/Prism/Add", prism);
49 | return (await resp.Content.ReadFromJsonAsync>()) ?? new List();
50 | }
51 |
52 | internal async Task> UnPrismRay(int rayId, int userId)
53 | {
54 | return (await http.GetFromJsonAsync>($"api/Prism/Remove/{userId}/{rayId}")) ?? new List();
55 | }
56 |
57 | internal async Task> UserRays(string name)
58 | {
59 | return (await http.GetFromJsonAsync>($"api/Ray/user/{name}")) ?? new List();
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | # For most projects, this workflow file will not need changing; you simply need
2 | # to commit it to your repository.
3 | #
4 | # You may wish to alter this file to override the set of languages analyzed,
5 | # or to provide custom queries or build logic.
6 | #
7 | # ******** NOTE ********
8 | # We have attempted to detect the languages in your repository. Please check
9 | # the `language` matrix defined below to confirm you have the correct set of
10 | # supported CodeQL languages.
11 | #
12 | name: "CodeQL"
13 |
14 | on:
15 | push:
16 | branches: [ main ]
17 | pull_request:
18 | # The branches below must be a subset of the branches above
19 | branches: [ main ]
20 | schedule:
21 | - cron: '40 21 * * 0'
22 |
23 | jobs:
24 | analyze:
25 | name: Analyze
26 | runs-on: ubuntu-latest
27 | permissions:
28 | actions: read
29 | contents: read
30 | security-events: write
31 |
32 | strategy:
33 | fail-fast: false
34 | matrix:
35 | language: [ 'csharp', 'javascript' ]
36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37 | # Learn more about CodeQL language support at https://git.io/codeql-language-support
38 |
39 | steps:
40 | - name: Checkout repository
41 | uses: actions/checkout@v2
42 |
43 | # Initializes the CodeQL tools for scanning.
44 | - name: Initialize CodeQL
45 | uses: github/codeql-action/init@v1
46 | with:
47 | languages: ${{ matrix.language }}
48 | # If you wish to specify custom queries, you can do so here or in a config file.
49 | # By default, queries listed here will override any specified in a config file.
50 | # Prefix the list here with "+" to use these queries and those in the config file.
51 | # queries: ./path/to/local/query, your-org/your-repo/queries@main
52 |
53 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54 | # If this step fails, then you should remove it and run the build manually (see below)
55 | - name: Autobuild
56 | uses: github/codeql-action/autobuild@v1
57 |
58 | # ℹ️ Command-line programs to run using the OS shell.
59 | # 📚 https://git.io/JvXDl
60 |
61 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62 | # and modify them (or add more) to build your code if your project
63 | # uses a compiled language
64 |
65 | #- run: |
66 | # make bootstrap
67 | # make release
68 |
69 | - name: Perform CodeQL Analysis
70 | uses: github/codeql-action/analyze@v1
71 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 | *.sh text=lf
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/Beam.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27703.2026
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Beam.Server", "Beam.Server\Beam.Server.csproj", "{77C7584D-0F7B-42E4-A8E9-8CD6D4F2FA1C}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Beam.Client", "Beam.Client\Beam.Client.csproj", "{EA966D5C-CB41-4E49-BF8D-957DD6D2FEB8}"
9 | EndProject
10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Beam.Shared", "Beam.Shared\Beam.Shared.csproj", "{9B38BE84-0E78-44CC-A403-F067EE861AAC}"
11 | EndProject
12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Beam.Data", "Beam.Data\Beam.Data.csproj", "{55E01C05-C581-4109-B751-825ECB93DBA7}"
13 | EndProject
14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Beam.Animation", "Beam.Animation\Beam.Animation.csproj", "{3404FB23-A71D-4ECB-8D4E-19763D57EA7E}"
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Debug|Any CPU = Debug|Any CPU
19 | Release|Any CPU = Release|Any CPU
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {77C7584D-0F7B-42E4-A8E9-8CD6D4F2FA1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {77C7584D-0F7B-42E4-A8E9-8CD6D4F2FA1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {77C7584D-0F7B-42E4-A8E9-8CD6D4F2FA1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {77C7584D-0F7B-42E4-A8E9-8CD6D4F2FA1C}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {EA966D5C-CB41-4E49-BF8D-957DD6D2FEB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {EA966D5C-CB41-4E49-BF8D-957DD6D2FEB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {EA966D5C-CB41-4E49-BF8D-957DD6D2FEB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
29 | {EA966D5C-CB41-4E49-BF8D-957DD6D2FEB8}.Release|Any CPU.Build.0 = Release|Any CPU
30 | {9B38BE84-0E78-44CC-A403-F067EE861AAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {9B38BE84-0E78-44CC-A403-F067EE861AAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {9B38BE84-0E78-44CC-A403-F067EE861AAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {9B38BE84-0E78-44CC-A403-F067EE861AAC}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {55E01C05-C581-4109-B751-825ECB93DBA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 | {55E01C05-C581-4109-B751-825ECB93DBA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 | {55E01C05-C581-4109-B751-825ECB93DBA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
37 | {55E01C05-C581-4109-B751-825ECB93DBA7}.Release|Any CPU.Build.0 = Release|Any CPU
38 | {3404FB23-A71D-4ECB-8D4E-19763D57EA7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {3404FB23-A71D-4ECB-8D4E-19763D57EA7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {3404FB23-A71D-4ECB-8D4E-19763D57EA7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
41 | {3404FB23-A71D-4ECB-8D4E-19763D57EA7E}.Release|Any CPU.Build.0 = Release|Any CPU
42 | EndGlobalSection
43 | GlobalSection(SolutionProperties) = preSolution
44 | HideSolutionNode = FALSE
45 | EndGlobalSection
46 | GlobalSection(ExtensibilityGlobals) = postSolution
47 | SolutionGuid = {DEEA6947-D433-4CF6-BA0A-BC9D6441D88F}
48 | EndGlobalSection
49 | EndGlobal
50 |
--------------------------------------------------------------------------------
/Beam.Client/Services/DataService.cs:
--------------------------------------------------------------------------------
1 | using Beam.Shared;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 |
7 | namespace Beam.Client.Services
8 | {
9 | public class DataService
10 | {
11 | private readonly BeamApiService _apiService;
12 | public IReadOnlyList Frequencies { get; private set; } = new List();
13 | public IReadOnlyList Rays { get; private set; } = new List();
14 | public User CurrentUser { get; set; }
15 |
16 | private int? selectedFrequency;
17 | public int SelectedFrequency
18 | {
19 | get
20 | {
21 | if (!selectedFrequency.HasValue && Frequencies.Count > 0)
22 | {
23 | selectedFrequency = Frequencies.First().Id;
24 | }
25 | return selectedFrequency ?? 0;
26 | }
27 | set
28 | {
29 | selectedFrequency = value;
30 | GetRays(value).ConfigureAwait(false);
31 | }
32 | }
33 |
34 | public DataService(BeamApiService apiService)
35 | {
36 | _apiService = apiService;
37 | if (CurrentUser == null) CurrentUser = new User() { Name = "Anon" + new Random().Next(0, 10) };
38 | }
39 |
40 | public event Action? UdpatedFrequencies;
41 | public event Action? UpdatedRays;
42 |
43 | public async Task GetFrequencies()
44 | {
45 | Frequencies = await _apiService.FrequencyList();
46 | UdpatedFrequencies?.Invoke();
47 | }
48 |
49 | public async Task GetRays(int FrequencyId)
50 | {
51 | Rays = new List();
52 | Rays = await _apiService.RayList(FrequencyId);
53 | UpdatedRays?.Invoke();
54 | }
55 |
56 | public async Task AddFrequency(string Name)
57 | {
58 | Frequencies = await _apiService.AddFrequency(new Frequency() { Name = Name });
59 | UdpatedFrequencies?.Invoke();
60 | }
61 |
62 | public async Task CreateRay(string text)
63 | {
64 | var ray = new Ray()
65 | {
66 | FrequencyId = selectedFrequency ?? 0,
67 | Text = text,
68 | UserId = CurrentUser.Id
69 | };
70 |
71 | if (CurrentUser.Id == 0)
72 | {
73 | await GetOrCreateUser();
74 | ray.UserId = CurrentUser.Id;
75 | }
76 |
77 | Rays = await _apiService.AddRay(ray);
78 | UpdatedRays?.Invoke();
79 | }
80 |
81 | public async Task GetOrCreateUser(string? newName = null)
82 | {
83 | CurrentUser = await _apiService.GetOrCreateUser(newName ?? CurrentUser.Name);
84 | }
85 |
86 | public async Task PrismRay(int RayId)
87 | {
88 | if (CurrentUser.Id == 0) await GetOrCreateUser();
89 | Rays = await _apiService.PrismRay(new Prism() { RayId = RayId, UserId = CurrentUser.Id });
90 | UpdatedRays?.Invoke();
91 | }
92 |
93 | public async Task UnPrismRay(int RayId)
94 | {
95 | if (CurrentUser.Id == 0) await GetOrCreateUser();
96 | Rays = await _apiService.UnPrismRay(RayId, CurrentUser.Id);
97 | UpdatedRays?.Invoke();
98 | }
99 |
100 | public async Task> GetUserRays(string name)
101 | {
102 | return await _apiService.UserRays(name ?? CurrentUser.Name);
103 | }
104 |
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/README.md:
--------------------------------------------------------------------------------
1 | [Open Iconic v1.1.1](http://useiconic.com/open)
2 | ===========
3 |
4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons)
5 |
6 |
7 |
8 | ## What's in Open Iconic?
9 |
10 | * 223 icons designed to be legible down to 8 pixels
11 | * Super-light SVG files - 61.8 for the entire set
12 | * SVG sprite—the modern replacement for icon fonts
13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats
14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats
15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px.
16 |
17 |
18 | ## Getting Started
19 |
20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections.
21 |
22 | ### General Usage
23 |
24 | #### Using Open Iconic's SVGs
25 |
26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute).
27 |
28 | ```
29 |
30 | ```
31 |
32 | #### Using Open Iconic's SVG Sprite
33 |
34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack.
35 |
36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.*
37 |
38 | ```
39 |
40 |
41 |
42 | ```
43 |
44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions.
45 |
46 | ```
47 | .icon {
48 | width: 16px;
49 | height: 16px;
50 | }
51 | ```
52 |
53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag.
54 |
55 | ```
56 | .icon-account-login {
57 | fill: #f00;
58 | }
59 | ```
60 |
61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/).
62 |
63 | #### Using Open Iconic's Icon Font...
64 |
65 |
66 | ##### …with Bootstrap
67 |
68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}`
69 |
70 |
71 | ```
72 |
73 | ```
74 |
75 |
76 | ```
77 |
78 | ```
79 |
80 | ##### …with Foundation
81 |
82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}`
83 |
84 | ```
85 |
86 | ```
87 |
88 |
89 | ```
90 |
91 | ```
92 |
93 | ##### …on its own
94 |
95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}`
96 |
97 | ```
98 |
99 | ```
100 |
101 | ```
102 |
103 | ```
104 |
105 |
106 | ## License
107 |
108 | ### Icons
109 |
110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT).
111 |
112 | ### Fonts
113 |
114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web).
115 |
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/FONT-LICENSE:
--------------------------------------------------------------------------------
1 | SIL OPEN FONT LICENSE Version 1.1
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | PREAMBLE
6 | The goals of the Open Font License (OFL) are to stimulate worldwide
7 | development of collaborative font projects, to support the font creation
8 | efforts of academic and linguistic communities, and to provide a free and
9 | open framework in which fonts may be shared and improved in partnership
10 | with others.
11 |
12 | The OFL allows the licensed fonts to be used, studied, modified and
13 | redistributed freely as long as they are not sold by themselves. The
14 | fonts, including any derivative works, can be bundled, embedded,
15 | redistributed and/or sold with any software provided that any reserved
16 | names are not used by derivative works. The fonts and derivatives,
17 | however, cannot be released under any other type of license. The
18 | requirement for fonts to remain under this license does not apply
19 | to any document created using the fonts or their derivatives.
20 |
21 | DEFINITIONS
22 | "Font Software" refers to the set of files released by the Copyright
23 | Holder(s) under this license and clearly marked as such. This may
24 | include source files, build scripts and documentation.
25 |
26 | "Reserved Font Name" refers to any names specified as such after the
27 | copyright statement(s).
28 |
29 | "Original Version" refers to the collection of Font Software components as
30 | distributed by the Copyright Holder(s).
31 |
32 | "Modified Version" refers to any derivative made by adding to, deleting,
33 | or substituting -- in part or in whole -- any of the components of the
34 | Original Version, by changing formats or by porting the Font Software to a
35 | new environment.
36 |
37 | "Author" refers to any designer, engineer, programmer, technical
38 | writer or other person who contributed to the Font Software.
39 |
40 | PERMISSION & CONDITIONS
41 | Permission is hereby granted, free of charge, to any person obtaining
42 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
43 | redistribute, and sell modified and unmodified copies of the Font
44 | Software, subject to the following conditions:
45 |
46 | 1) Neither the Font Software nor any of its individual components,
47 | in Original or Modified Versions, may be sold by itself.
48 |
49 | 2) Original or Modified Versions of the Font Software may be bundled,
50 | redistributed and/or sold with any software, provided that each copy
51 | contains the above copyright notice and this license. These can be
52 | included either as stand-alone text files, human-readable headers or
53 | in the appropriate machine-readable metadata fields within text or
54 | binary files as long as those fields can be easily viewed by the user.
55 |
56 | 3) No Modified Version of the Font Software may use the Reserved Font
57 | Name(s) unless explicit written permission is granted by the corresponding
58 | Copyright Holder. This restriction only applies to the primary font name as
59 | presented to the users.
60 |
61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
62 | Software shall not be used to promote, endorse or advertise any
63 | Modified Version, except to acknowledge the contribution(s) of the
64 | Copyright Holder(s) and the Author(s) or with their explicit written
65 | permission.
66 |
67 | 5) The Font Software, modified or unmodified, in part or in whole,
68 | must be distributed entirely under this license, and must not be
69 | distributed under any other license. The requirement for fonts to
70 | remain under this license does not apply to any document created
71 | using the Font Software.
72 |
73 | TERMINATION
74 | This license becomes null and void if any of the above conditions are
75 | not met.
76 |
77 | DISCLAIMER
78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
86 | OTHER DEALINGS IN THE FONT SOFTWARE.
87 |
--------------------------------------------------------------------------------
/Beam.Data/Migrations/BeamContextModelSnapshot.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using Beam.Data;
4 | using Microsoft.EntityFrameworkCore;
5 | using Microsoft.EntityFrameworkCore.Infrastructure;
6 | using Microsoft.EntityFrameworkCore.Metadata;
7 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8 |
9 | namespace Beam.Data.Migrations
10 | {
11 | [DbContext(typeof(BeamContext))]
12 | partial class BeamContextModelSnapshot : ModelSnapshot
13 | {
14 | protected override void BuildModel(ModelBuilder modelBuilder)
15 | {
16 | #pragma warning disable 612, 618
17 | modelBuilder
18 | .HasAnnotation("ProductVersion", "3.0.0-preview5.19227.1")
19 | .HasAnnotation("Relational:MaxIdentifierLength", 128)
20 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
21 |
22 | modelBuilder.Entity("Beam.Data.Frequency", b =>
23 | {
24 | b.Property("FrequencyId")
25 | .ValueGeneratedOnAdd()
26 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
27 |
28 | b.Property("Name");
29 |
30 | b.HasKey("FrequencyId");
31 |
32 | b.ToTable("Frequencies");
33 | });
34 |
35 | modelBuilder.Entity("Beam.Data.Prism", b =>
36 | {
37 | b.Property("PrismId")
38 | .ValueGeneratedOnAdd()
39 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
40 |
41 | b.Property("RayId");
42 |
43 | b.Property("UserId");
44 |
45 | b.HasKey("PrismId");
46 |
47 | b.HasIndex("RayId");
48 |
49 | b.HasIndex("UserId");
50 |
51 | b.ToTable("Prisms");
52 | });
53 |
54 | modelBuilder.Entity("Beam.Data.Ray", b =>
55 | {
56 | b.Property("RayId")
57 | .ValueGeneratedOnAdd()
58 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
59 |
60 | b.Property("FrequencyId");
61 |
62 | b.Property("Text");
63 |
64 | b.Property("UserId");
65 |
66 | b.HasKey("RayId");
67 |
68 | b.HasIndex("FrequencyId");
69 |
70 | b.HasIndex("UserId");
71 |
72 | b.ToTable("Rays");
73 | });
74 |
75 | modelBuilder.Entity("Beam.Data.User", b =>
76 | {
77 | b.Property("UserId")
78 | .ValueGeneratedOnAdd()
79 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
80 |
81 | b.Property("Username");
82 |
83 | b.HasKey("UserId");
84 |
85 | b.ToTable("Users");
86 | });
87 |
88 | modelBuilder.Entity("Beam.Data.Prism", b =>
89 | {
90 | b.HasOne("Beam.Data.Ray", "Ray")
91 | .WithMany("Prisms")
92 | .HasForeignKey("RayId")
93 | .OnDelete(DeleteBehavior.Cascade)
94 | .IsRequired();
95 |
96 | b.HasOne("Beam.Data.User", "User")
97 | .WithMany("Prisms")
98 | .HasForeignKey("UserId")
99 | .OnDelete(DeleteBehavior.Cascade)
100 | .IsRequired();
101 | });
102 |
103 | modelBuilder.Entity("Beam.Data.Ray", b =>
104 | {
105 | b.HasOne("Beam.Data.Frequency", "Frequency")
106 | .WithMany("Rays")
107 | .HasForeignKey("FrequencyId")
108 | .OnDelete(DeleteBehavior.Cascade)
109 | .IsRequired();
110 |
111 | b.HasOne("Beam.Data.User", "User")
112 | .WithMany("Rays")
113 | .HasForeignKey("UserId");
114 | });
115 | #pragma warning restore 612, 618
116 | }
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/Beam.Data/Migrations/20190610152053_InitialCreate.Designer.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using Beam.Data;
4 | using Microsoft.EntityFrameworkCore;
5 | using Microsoft.EntityFrameworkCore.Infrastructure;
6 | using Microsoft.EntityFrameworkCore.Metadata;
7 | using Microsoft.EntityFrameworkCore.Migrations;
8 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
9 |
10 | namespace Beam.Data.Migrations
11 | {
12 | [DbContext(typeof(BeamContext))]
13 | [Migration("20190610152053_InitialCreate")]
14 | partial class InitialCreate
15 | {
16 | protected override void BuildTargetModel(ModelBuilder modelBuilder)
17 | {
18 | #pragma warning disable 612, 618
19 | modelBuilder
20 | .HasAnnotation("ProductVersion", "3.0.0-preview5.19227.1")
21 | .HasAnnotation("Relational:MaxIdentifierLength", 128)
22 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23 |
24 | modelBuilder.Entity("Beam.Data.Frequency", b =>
25 | {
26 | b.Property("FrequencyId")
27 | .ValueGeneratedOnAdd()
28 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29 |
30 | b.Property("Name");
31 |
32 | b.HasKey("FrequencyId");
33 |
34 | b.ToTable("Frequencies");
35 | });
36 |
37 | modelBuilder.Entity("Beam.Data.Prism", b =>
38 | {
39 | b.Property("PrismId")
40 | .ValueGeneratedOnAdd()
41 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
42 |
43 | b.Property("RayId");
44 |
45 | b.Property("UserId");
46 |
47 | b.HasKey("PrismId");
48 |
49 | b.HasIndex("RayId");
50 |
51 | b.HasIndex("UserId");
52 |
53 | b.ToTable("Prisms");
54 | });
55 |
56 | modelBuilder.Entity("Beam.Data.Ray", b =>
57 | {
58 | b.Property("RayId")
59 | .ValueGeneratedOnAdd()
60 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
61 |
62 | b.Property("FrequencyId");
63 |
64 | b.Property("Text");
65 |
66 | b.Property("UserId");
67 |
68 | b.HasKey("RayId");
69 |
70 | b.HasIndex("FrequencyId");
71 |
72 | b.HasIndex("UserId");
73 |
74 | b.ToTable("Rays");
75 | });
76 |
77 | modelBuilder.Entity("Beam.Data.User", b =>
78 | {
79 | b.Property("UserId")
80 | .ValueGeneratedOnAdd()
81 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
82 |
83 | b.Property("Username");
84 |
85 | b.HasKey("UserId");
86 |
87 | b.ToTable("Users");
88 | });
89 |
90 | modelBuilder.Entity("Beam.Data.Prism", b =>
91 | {
92 | b.HasOne("Beam.Data.Ray", "Ray")
93 | .WithMany("Prisms")
94 | .HasForeignKey("RayId")
95 | .OnDelete(DeleteBehavior.Cascade)
96 | .IsRequired();
97 |
98 | b.HasOne("Beam.Data.User", "User")
99 | .WithMany("Prisms")
100 | .HasForeignKey("UserId")
101 | .OnDelete(DeleteBehavior.Cascade)
102 | .IsRequired();
103 | });
104 |
105 | modelBuilder.Entity("Beam.Data.Ray", b =>
106 | {
107 | b.HasOne("Beam.Data.Frequency", "Frequency")
108 | .WithMany("Rays")
109 | .HasForeignKey("FrequencyId")
110 | .OnDelete(DeleteBehavior.Cascade)
111 | .IsRequired();
112 |
113 | b.HasOne("Beam.Data.User", "User")
114 | .WithMany("Rays")
115 | .HasForeignKey("UserId");
116 | });
117 | #pragma warning restore 612, 618
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/Beam.Data/Migrations/20190610152053_InitialCreate.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.EntityFrameworkCore.Metadata;
2 | using Microsoft.EntityFrameworkCore.Migrations;
3 |
4 | namespace Beam.Data.Migrations
5 | {
6 | public partial class InitialCreate : Migration
7 | {
8 | protected override void Up(MigrationBuilder migrationBuilder)
9 | {
10 | migrationBuilder.CreateTable(
11 | name: "Frequencies",
12 | columns: table => new
13 | {
14 | FrequencyId = table.Column(nullable: false)
15 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
16 | Name = table.Column(nullable: true)
17 | },
18 | constraints: table =>
19 | {
20 | table.PrimaryKey("PK_Frequencies", x => x.FrequencyId);
21 | });
22 |
23 | migrationBuilder.CreateTable(
24 | name: "Users",
25 | columns: table => new
26 | {
27 | UserId = table.Column(nullable: false)
28 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
29 | Username = table.Column(nullable: true)
30 | },
31 | constraints: table =>
32 | {
33 | table.PrimaryKey("PK_Users", x => x.UserId);
34 | });
35 |
36 | migrationBuilder.CreateTable(
37 | name: "Rays",
38 | columns: table => new
39 | {
40 | RayId = table.Column(nullable: false)
41 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
42 | Text = table.Column(nullable: true),
43 | FrequencyId = table.Column(nullable: false),
44 | UserId = table.Column(nullable: true)
45 | },
46 | constraints: table =>
47 | {
48 | table.PrimaryKey("PK_Rays", x => x.RayId);
49 | table.ForeignKey(
50 | name: "FK_Rays_Frequencies_FrequencyId",
51 | column: x => x.FrequencyId,
52 | principalTable: "Frequencies",
53 | principalColumn: "FrequencyId",
54 | onDelete: ReferentialAction.Cascade);
55 | table.ForeignKey(
56 | name: "FK_Rays_Users_UserId",
57 | column: x => x.UserId,
58 | principalTable: "Users",
59 | principalColumn: "UserId",
60 | onDelete: ReferentialAction.Restrict);
61 | });
62 |
63 | migrationBuilder.CreateTable(
64 | name: "Prisms",
65 | columns: table => new
66 | {
67 | PrismId = table.Column(nullable: false)
68 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
69 | UserId = table.Column(nullable: false),
70 | RayId = table.Column(nullable: false)
71 | },
72 | constraints: table =>
73 | {
74 | table.PrimaryKey("PK_Prisms", x => x.PrismId);
75 | table.ForeignKey(
76 | name: "FK_Prisms_Rays_RayId",
77 | column: x => x.RayId,
78 | principalTable: "Rays",
79 | principalColumn: "RayId",
80 | onDelete: ReferentialAction.Cascade);
81 | table.ForeignKey(
82 | name: "FK_Prisms_Users_UserId",
83 | column: x => x.UserId,
84 | principalTable: "Users",
85 | principalColumn: "UserId",
86 | onDelete: ReferentialAction.Cascade);
87 | });
88 |
89 | migrationBuilder.CreateIndex(
90 | name: "IX_Prisms_RayId",
91 | table: "Prisms",
92 | column: "RayId");
93 |
94 | migrationBuilder.CreateIndex(
95 | name: "IX_Prisms_UserId",
96 | table: "Prisms",
97 | column: "UserId");
98 |
99 | migrationBuilder.CreateIndex(
100 | name: "IX_Rays_FrequencyId",
101 | table: "Rays",
102 | column: "FrequencyId");
103 |
104 | migrationBuilder.CreateIndex(
105 | name: "IX_Rays_UserId",
106 | table: "Rays",
107 | column: "UserId");
108 | }
109 |
110 | protected override void Down(MigrationBuilder migrationBuilder)
111 | {
112 | migrationBuilder.DropTable(
113 | name: "Prisms");
114 |
115 | migrationBuilder.DropTable(
116 | name: "Rays");
117 |
118 | migrationBuilder.DropTable(
119 | name: "Frequencies");
120 |
121 | migrationBuilder.DropTable(
122 | name: "Users");
123 | }
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | project.fragment.lock.json
46 | artifacts/
47 |
48 | *_i.c
49 | *_p.c
50 | *_i.h
51 | *.ilk
52 | *.meta
53 | *.obj
54 | *.pch
55 | *.pdb
56 | *.pgc
57 | *.pgd
58 | *.rsp
59 | *.sbr
60 | *.tlb
61 | *.tli
62 | *.tlh
63 | *.tmp
64 | *.tmp_proj
65 | *.log
66 | *.vspscc
67 | *.vssscc
68 | .builds
69 | *.pidb
70 | *.svclog
71 | *.scc
72 |
73 | # Chutzpah Test files
74 | _Chutzpah*
75 |
76 | # Visual C++ cache files
77 | ipch/
78 | *.aps
79 | *.ncb
80 | *.opendb
81 | *.opensdf
82 | *.sdf
83 | *.cachefile
84 | *.VC.db
85 | *.VC.VC.opendb
86 |
87 | # Visual Studio profiler
88 | *.psess
89 | *.vsp
90 | *.vspx
91 | *.sap
92 |
93 | # TFS 2012 Local Workspace
94 | $tf/
95 |
96 | # Guidance Automation Toolkit
97 | *.gpState
98 |
99 | # ReSharper is a .NET coding add-in
100 | _ReSharper*/
101 | *.[Rr]e[Ss]harper
102 | *.DotSettings.user
103 |
104 | # JustCode is a .NET coding add-in
105 | .JustCode
106 |
107 | # TeamCity is a build add-in
108 | _TeamCity*
109 |
110 | # DotCover is a Code Coverage Tool
111 | *.dotCover
112 |
113 | # NCrunch
114 | _NCrunch_*
115 | .*crunch*.local.xml
116 | nCrunchTemp_*
117 |
118 | # MightyMoose
119 | *.mm.*
120 | AutoTest.Net/
121 |
122 | # Web workbench (sass)
123 | .sass-cache/
124 |
125 | # Installshield output folder
126 | [Ee]xpress/
127 |
128 | # DocProject is a documentation generator add-in
129 | DocProject/buildhelp/
130 | DocProject/Help/*.HxT
131 | DocProject/Help/*.HxC
132 | DocProject/Help/*.hhc
133 | DocProject/Help/*.hhk
134 | DocProject/Help/*.hhp
135 | DocProject/Help/Html2
136 | DocProject/Help/html
137 |
138 | # Click-Once directory
139 | publish/
140 |
141 | # Publish Web Output
142 | *.[Pp]ublish.xml
143 | *.azurePubxml
144 | # TODO: Comment the next line if you want to checkin your web deploy settings
145 | # but database connection strings (with potential passwords) will be unencrypted
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
150 | # checkin your Azure Web App publish settings, but sensitive information contained
151 | # in these scripts will be unencrypted
152 | PublishScripts/
153 |
154 | # NuGet Packages
155 | *.nupkg
156 | # The packages folder can be ignored because of Package Restore
157 | **/packages/*
158 | # except build/, which is used as an MSBuild target.
159 | !**/packages/build/
160 | # Uncomment if necessary however generally it will be regenerated when needed
161 | #!**/packages/repositories.config
162 | # NuGet v3's project.json files produces more ignoreable files
163 | *.nuget.props
164 | *.nuget.targets
165 |
166 | # Microsoft Azure Build Output
167 | csx/
168 | *.build.csdef
169 |
170 | # Microsoft Azure Emulator
171 | ecf/
172 | rcf/
173 |
174 | # Windows Store app package directories and files
175 | AppPackages/
176 | BundleArtifacts/
177 | Package.StoreAssociation.xml
178 | _pkginfo.txt
179 |
180 | # Visual Studio cache files
181 | # files ending in .cache can be ignored
182 | *.[Cc]ache
183 | # but keep track of directories ending in .cache
184 | !*.[Cc]ache/
185 |
186 | # Others
187 | ClientBin/
188 | ~$*
189 | *~
190 | *.dbmdl
191 | *.dbproj.schemaview
192 | *.jfm
193 | *.pfx
194 | *.publishsettings
195 | node_modules/
196 | orleans.codegen.cs
197 |
198 | # Since there are multiple workflows, uncomment next line to ignore bower_components
199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
200 | #bower_components/
201 |
202 | # RIA/Silverlight projects
203 | Generated_Code/
204 |
205 | # Backup & report files from converting an old project file
206 | # to a newer Visual Studio version. Backup files are not needed,
207 | # because we have git ;-)
208 | _UpgradeReport_Files/
209 | Backup*/
210 | UpgradeLog*.XML
211 | UpgradeLog*.htm
212 |
213 | # SQL Server files
214 | *.mdf
215 | *.ldf
216 |
217 | # Business Intelligence projects
218 | *.rdl.data
219 | *.bim.layout
220 | *.bim_*.settings
221 |
222 | # Microsoft Fakes
223 | FakesAssemblies/
224 |
225 | # GhostDoc plugin setting file
226 | *.GhostDoc.xml
227 |
228 | # Node.js Tools for Visual Studio
229 | .ntvs_analysis.dat
230 |
231 | # Visual Studio 6 build log
232 | *.plg
233 |
234 | # Visual Studio 6 workspace options file
235 | *.opt
236 |
237 | # Visual Studio LightSwitch build output
238 | **/*.HTMLClient/GeneratedArtifacts
239 | **/*.DesktopClient/GeneratedArtifacts
240 | **/*.DesktopClient/ModelManifest.xml
241 | **/*.Server/GeneratedArtifacts
242 | **/*.Server/ModelManifest.xml
243 | _Pvt_Extensions
244 |
245 | # Paket dependency manager
246 | .paket/paket.exe
247 | paket-files/
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | # JetBrains Rider
253 | .idea/
254 | *.sln.iml
255 |
256 | # CodeRush
257 | .cr/
258 |
259 | # Python Tools for Visual Studio (PTVS)
260 | __pycache__/
261 | *.pyc
262 | .DS_Store
263 |
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css:
--------------------------------------------------------------------------------
1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'}
--------------------------------------------------------------------------------
/Beam.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 | Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014
9 | By P.J. Onori
10 | Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net)
11 |
12 |
13 |
14 |
27 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
45 |
47 |
49 |
51 |
53 |
55 |
57 |
59 |
61 |
63 |
65 |
67 |
69 |
71 |
74 |
76 |
79 |
81 |
84 |
86 |
88 |
91 |
93 |
95 |
98 |
100 |
102 |
104 |
106 |
109 |
112 |
115 |
117 |
121 |
123 |
125 |
127 |
130 |
132 |
134 |
136 |
138 |
141 |
143 |
145 |
147 |
149 |
151 |
153 |
155 |
157 |
159 |
162 |
165 |
167 |
169 |
172 |
174 |
177 |
179 |
181 |
183 |
185 |
189 |
191 |
194 |
196 |
198 |
200 |
202 |
205 |
207 |
209 |
211 |
213 |
215 |
218 |
220 |
222 |
224 |
226 |
228 |
230 |
232 |
234 |
236 |
238 |
241 |
243 |
245 |
247 |
249 |
251 |
253 |
256 |
259 |
261 |
263 |
265 |
267 |
269 |
272 |
274 |
276 |
280 |
282 |
285 |
287 |
289 |
292 |
295 |
298 |
300 |
302 |
304 |
306 |
309 |
312 |
314 |
316 |
318 |
320 |
322 |
324 |
326 |
330 |
334 |
338 |
340 |
343 |
345 |
347 |
349 |
351 |
353 |
355 |
358 |
360 |
363 |
365 |
367 |
369 |
371 |
373 |
375 |
377 |
379 |
381 |
383 |
386 |
388 |
390 |
392 |
394 |
396 |
399 |
401 |
404 |
406 |
408 |
410 |
412 |
414 |
416 |
419 |
421 |
423 |
425 |
428 |
431 |
435 |
438 |
440 |
442 |
444 |
446 |
448 |
451 |
453 |
455 |
457 |
460 |
462 |
464 |
466 |
468 |
471 |
473 |
477 |
479 |
481 |
483 |
486 |
488 |
490 |
492 |
494 |
496 |
499 |
501 |
504 |
506 |
509 |
512 |
515 |
517 |
520 |
522 |
524 |
526 |
529 |
532 |
534 |
536 |
539 |
542 |
543 |
544 |
--------------------------------------------------------------------------------