Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Sqlite3 #1

Open
wants to merge 103 commits into
base: sqlite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
7ba87a1
sqlite3
MessiDaGod Aug 5, 2022
da2a722
fucking finally
MessiDaGod Aug 6, 2022
3193c81
updated to sqlite3
MessiDaGod Aug 6, 2022
54bc665
idk
MessiDaGod Aug 6, 2022
9abf753
got candles to only run when clicking on link
MessiDaGod Aug 6, 2022
92dfc87
fixing sql.js errors
MessiDaGod Aug 6, 2022
aff7535
added toggledrawer() when links and @ontouchleave
MessiDaGod Aug 6, 2022
1299161
added @ontouchleave
MessiDaGod Aug 6, 2022
1fac4b0
added local Radzen.Blazor.js
MessiDaGod Aug 6, 2022
850ed9a
added local Radzen.Blazor.js
MessiDaGod Aug 6, 2022
7819476
added back spinner and dark-light theme
MessiDaGod Aug 8, 2022
4988174
added BSN back
MessiDaGod Aug 9, 2022
9e24b69
almost
MessiDaGod Aug 10, 2022
b8305bb
finallly can run multi queries after another fuck
MessiDaGod Aug 10, 2022
7c6f9ee
before changing Sql logic
MessiDaGod Aug 10, 2022
afa1a6b
added monaco files
MessiDaGod Aug 10, 2022
63d97a7
added gridjs grid
MessiDaGod Aug 10, 2022
6188f8f
rebuilding the query
MessiDaGod Aug 10, 2022
a578483
added react
MessiDaGod Aug 10, 2022
aa57d44
react
MessiDaGod Aug 10, 2022
e1aee12
idk
MessiDaGod Aug 10, 2022
30489f6
export json working for queries
MessiDaGod Aug 11, 2022
931d23b
cleanup to sql.js
MessiDaGod Aug 11, 2022
dbe1c92
idk why monaco blazor isn't working in ghpages
MessiDaGod Aug 11, 2022
98e77e9
fixed index.html
MessiDaGod Aug 11, 2022
9ab49b7
wtf
MessiDaGod Aug 12, 2022
d79510e
updated index.html
MessiDaGod Aug 12, 2022
4a55cc4
added linkedin
MessiDaGod Aug 12, 2022
48de004
added sql language colorizing fixes issue #3
MessiDaGod Aug 12, 2022
1f3ab9d
formatting numbers in Sql.js
MessiDaGod Aug 12, 2022
b109438
added gulpfile
MessiDaGod Aug 13, 2022
a43c614
added formatting
MessiDaGod Aug 15, 2022
40d07d4
added formatting
MessiDaGod Aug 15, 2022
5b1450d
almost gett poormans sql to work
MessiDaGod Aug 15, 2022
032782b
formatting
MessiDaGod Aug 15, 2022
822b53d
ok
MessiDaGod Aug 15, 2022
411158d
refactoring from jetbrains
MessiDaGod Aug 16, 2022
525afdd
adding fusionauth
MessiDaGod Aug 20, 2022
e43f282
added os detection
MessiDaGod Aug 20, 2022
392f8d5
added os detection
MessiDaGod Aug 20, 2022
61459d4
working again
MessiDaGod Aug 20, 2022
faf0768
add poor man's submodule
MessiDaGod Aug 20, 2022
393e83f
os
MessiDaGod Aug 20, 2022
57e0a22
rider
MessiDaGod Aug 20, 2022
7b2357c
removed RunAOTCompilation
MessiDaGod Aug 20, 2022
454d889
Update README.md
MessiDaGod Aug 20, 2022
8819612
moved os to far left
MessiDaGod Aug 20, 2022
7333d69
Merge branch 'sqlite3' of https://github.com/MessiDaGod/AllMyLinks in…
MessiDaGod Aug 20, 2022
42967c0
formatting of os button
MessiDaGod Aug 20, 2022
6a87154
macosx on edge
MessiDaGod Aug 20, 2022
632d827
formatting working
MessiDaGod Aug 20, 2022
b68f531
formatter working
MessiDaGod Aug 20, 2022
4907166
format sql
MessiDaGod Aug 20, 2022
2df35a3
only show sql and candles if mobile
MessiDaGod Aug 21, 2022
7aae1c9
updated iframe
MessiDaGod Aug 21, 2022
0b0e492
fixed ifram eactually
MessiDaGod Aug 21, 2022
09e944b
idk
MessiDaGod Aug 21, 2022
0ba7a29
idk
MessiDaGod Aug 21, 2022
d90ba4b
dt
MessiDaGod Aug 30, 2022
65bf174
formatting may be working
MessiDaGod Aug 30, 2022
dc76fe9
fixes to urls for localhost vs github.com
MessiDaGod Aug 30, 2022
3985303
updated react-data-grid
MessiDaGod Aug 30, 2022
2212101
updated urls
MessiDaGod Aug 30, 2022
be1ca10
trying to fix url
MessiDaGod Aug 30, 2022
9fda6fe
url fixed I think
MessiDaGod Aug 30, 2022
7d9c0c6
execute query working with comments
MessiDaGod Aug 30, 2022
541c152
folder structure changes
MessiDaGod Aug 30, 2022
9c38425
try to fix url
MessiDaGod Aug 30, 2022
e879cb5
formatting almost there
MessiDaGod Aug 30, 2022
2945edf
so close
MessiDaGod Aug 30, 2022
f1516d7
so close
MessiDaGod Aug 30, 2022
054e35b
almost there
MessiDaGod Aug 30, 2022
19ebca6
so close
MessiDaGod Aug 30, 2022
cdb112b
idk
MessiDaGod Aug 30, 2022
7f02ec7
changed default error message
MessiDaGod Aug 30, 2022
949f5eb
added sql2
MessiDaGod Aug 30, 2022
7d3c8aa
fixed up tab hiding and showing
MessiDaGod Aug 30, 2022
f47496c
simplified tab hiding
MessiDaGod Aug 30, 2022
c2557b7
got away from using iFrame
MessiDaGod Aug 30, 2022
9d5ff61
think i got it formatting correctly
MessiDaGod Aug 31, 2022
364c279
added Promise which fixes having to formt twice
MessiDaGod Aug 31, 2022
d05ac02
fixed formatting weird 2nd time
MessiDaGod Aug 31, 2022
2f40c46
cnt fckin fig why fmting isn't wrkng the 2nd time
MessiDaGod Aug 31, 2022
ca1c5cf
finally fucking fixed, can reformat any amt of x's
MessiDaGod Aug 31, 2022
9bb693d
changed to \n + " " instead of \n\t
MessiDaGod Aug 31, 2022
bdffd69
some cleaning up
MessiDaGod Aug 31, 2022
20a5fc6
changed icon when on mobile
MessiDaGod Aug 31, 2022
25ab42d
hiding menu items if on mobile
MessiDaGod Aug 31, 2022
ee5c68e
removing features on mobile
MessiDaGod Aug 31, 2022
e872fcd
added functions
MessiDaGod Aug 31, 2022
48c1009
added more tooltips
MessiDaGod Aug 31, 2022
7a2623d
added resize to grid
MessiDaGod Aug 31, 2022
b398f65
formatting things
MessiDaGod Sep 1, 2022
415fe05
fixed active
MessiDaGod Sep 1, 2022
e25325d
fixed active tbl hilite and rendering table
MessiDaGod Sep 1, 2022
4af9d0e
almost got filtering to work
MessiDaGod Sep 1, 2022
14d70e3
Filtering working
MessiDaGod Sep 1, 2022
361135b
switching tabs when clicking table now working
MessiDaGod Sep 1, 2022
c8424a1
made it so sql formatter always shows
MessiDaGod Sep 2, 2022
72ee7c9
adding error catching to browsedata
MessiDaGod Sep 2, 2022
d20c814
getting rid of sql and candles when mobile
MessiDaGod Sep 6, 2022
72b8b6c
k
MessiDaGod Nov 5, 2022
f047074
yee
MessiDaGod Sep 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: gh-pages
on:
push:
branches:
- main
- sqlite
- sqlite3

jobs:
build:
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ Syncfusion*

Files/
# Visual Studio 2015/2017 cache/options directory

.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "PoorMansTSqlFormatterLib"]
path = PoorMansTSqlFormatterLib
url = https://github.com/MessiDaGod/PoorMansTSqlFormatterLib.git
8 changes: 8 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"development"
],
"hints": {
"meta-viewport": "off"
}
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"sqlite3"
]
}
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
],
"problemMatcher": "$msCompile"
},
{
"label": "clean",
"command": "dotnet",
"type": "process",
"args": [
"clean",
"${workspaceFolder}/allmylinks.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
Expand Down
13 changes: 13 additions & 0 deletions Abstractions/Clients.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using RestEase;

namespace allmylinks.Abstractions;

[BasePath("counter")]
public interface ICounterClientDef
{
[Post("increment")]
Task Increment(CancellationToken cancellationToken = default);

[Get("get")]
Task<int> Get(CancellationToken cancellationToken = default);
}
9 changes: 9 additions & 0 deletions Abstractions/ICounterService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Stl.Fusion;

namespace allmylinks.Abstractions;
public interface ICounterService
{
[ComputeMethod]
Task<int> Get(CancellationToken cancellationToken = default);
Task Increment(CancellationToken cancellationToken = default);
}
7 changes: 2 additions & 5 deletions Components/LandingPage/CalculatorApp/Expression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
//SOFTWARE.


using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

namespace PrimitiveCalculator
{
Expand All @@ -42,7 +39,7 @@ public Expression(string expression)

public Expression(SimpleParser parser)
{
this._parser = parser;
_parser = parser;
}

public Expression(double nr)
Expand Down Expand Up @@ -70,7 +67,7 @@ public double Eval()
}
else if (_parser.NextIs("+-*^/%".ToCharArray()))
{
var op = new Operation() { Operator = _parser.NextChar.ToString() };
var op = new Operation { Operator = _parser.NextChar.ToString() };
_parser.Skip(1);
_parser.ConsumeAny(' ');
if (_parser.NextIs('('))
Expand Down
5 changes: 1 addition & 4 deletions Components/LandingPage/CalculatorApp/SimpleParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//SOFTWARE.

using System;
using System.Diagnostics;
using System.Linq;
using System.Text;


namespace PrimitiveCalculator
{
public class SimpleParser
Expand All @@ -36,7 +33,7 @@ public SimpleParser(string s)
_data = s;
}
protected string _data;
public int Position { get; set; } = 0;
public int Position { get; set; }

// returns true if the next char is one of the given chars. does not consume
public bool NextIs(params char[] chars)
Expand Down
1 change: 0 additions & 1 deletion Components/LandingPage/LandingSection.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@namespace allmylinks.Components
@using MudBlazor.Utilities


@* <section class="@SectionClassnames"> *@
Expand Down
27 changes: 12 additions & 15 deletions Components/LandingPage/MiniApp/MiniApp.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@using Microsoft.AspNetCore.Components
@using MudBlazor.Utilities
@using MudBlazor.Examples.Data.Models
@using MudBlazor.Utilities
@using Orientation = MudBlazor.Orientation
@namespace allmylinks.Components.LandingPage

<div class="d-flex mud-width-full mud-height-full">
Expand Down Expand Up @@ -184,7 +184,7 @@
{
<div class="lp-app-grid">
<MudPaper Class="rounded-lg">
<MudDatePicker PickerVariant="PickerVariant.Static" Orientation="MudBlazor.Orientation.Landscape" Date="@(DateTime.Today.AddDays(1))" Class="rounded-lg" />
<MudDatePicker PickerVariant="PickerVariant.Static" Orientation="Orientation.Landscape" Date="@(DateTime.Today.AddDays(1))" Class="rounded-lg" />
</MudPaper>
<MudPaper Class="rounded-lg d-flex flex-column">
<div class="d-flex align-center px-4 pt-4 pb-3 gap-4">
Expand All @@ -195,7 +195,7 @@
<div class="d-flex flex-column pa-4 gap-4">
<MudTextField T="string" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Rounded.CreditCard" Mask="@(new PatternMask("0000 0000 0000 0000"))" Label="Card Number" Placeholder="0000 0000 0000 0000" Variant="@Variant.Text" />
<div class="d-flex gap-4">
<MudTextField T="string" Mask="@(new DateMask("MM/YY", 'Y', 'M'))" Label="Expiration" Placeholder="MM/YY" Variant="@Variant.Text" />
<MudTextField T="string" Mask="@(new DateMask("MM/YY", 'Y'))" Label="Expiration" Placeholder="MM/YY" Variant="@Variant.Text" />
<MudTextField T="string" Mask="@(new PatternMask("000"))" Label="CVC" Placeholder="000" Variant="@Variant.Text" />
</div>
</div>
Expand Down Expand Up @@ -330,10 +330,7 @@
{
return "width:240px;";
}
else
{
return "width:0;opacity:0;";
}
return "width:0;opacity:0;";
}

protected override void OnParametersSet()
Expand All @@ -348,13 +345,13 @@
}
}

private IEnumerable<Element> Elements = new List<Element>()
private IEnumerable<Element> Elements = new List<Element>
{
new Element() { Number = 1, Sign = "H", Name = "Hydrogen", Position = 0, Molar = 1.00794},
new Element() { Number = 2, Sign = "He", Name = "Helium", Position = 17, Molar = 4.002602},
new Element() { Number = 3, Sign = "Li", Name = "Lithium", Position = 0, Molar = 6.941},
new Element() { Number = 4, Sign = "Be", Name = "Beryllium", Position = 1, Molar = 9.012182},
new Element() { Number = 5, Sign = "C", Name = "Carbon", Position = 13, Molar = 12.0107},
new Element() { Number = 6, Sign = "O", Name = "Oxygen", Position = 15, Molar = 15.9994},
new Element { Number = 1, Sign = "H", Name = "Hydrogen", Position = 0, Molar = 1.00794},
new Element { Number = 2, Sign = "He", Name = "Helium", Position = 17, Molar = 4.002602},
new Element { Number = 3, Sign = "Li", Name = "Lithium", Position = 0, Molar = 6.941},
new Element { Number = 4, Sign = "Be", Name = "Beryllium", Position = 1, Molar = 9.012182},
new Element { Number = 5, Sign = "C", Name = "Carbon", Position = 13, Molar = 12.0107},
new Element { Number = 6, Sign = "O", Name = "Oxygen", Position = 15, Molar = 15.9994},
};
}
5 changes: 2 additions & 3 deletions Components/QueuedContent.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@implements IDisposable
@using allmylinks.Services;
@inject IRenderQueueService RenderQueue
@namespace allmylinks.Components

Expand All @@ -13,8 +12,8 @@
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public bool RenderImmediately { get; set; }

private bool _showContent = false;
private bool _disposed = false;
private bool _showContent;
private bool _disposed;
public event Action<QueuedContent> Rendered;
public event Action<QueuedContent> Disposed;

Expand Down
14 changes: 6 additions & 8 deletions Context.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.InteropServices;
using Microsoft.EntityFrameworkCore;
using Microsoft.JSInterop;
using SQLite;
using SQLitePCL;

namespace allmylinks;
public class Context : DbContext
Expand All @@ -16,7 +14,7 @@ public Context(
DbContextOptions<Context> options,
IJSRuntime jsRuntime) : base(options)
{
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_e_sqlite3());
raw.SetProvider(new SQLite3Provider_e_sqlite3());
_moduleTask = new(() => jsRuntime.InvokeAsync<IJSObjectReference>(
"import", "./js/AllMyLinks.js").AsTask());
}
Expand Down Expand Up @@ -56,13 +54,13 @@ private async Task PersistDatabaseAsync(CancellationToken cancellationToken = de

}

[System.ComponentModel.DataAnnotations.Schema.Table(nameof(Person))]
[Table(nameof(Person))]
public record Person : LongKeyedEntity
{
public Person() { }

public string? FirstName { get; set; } = null!;
public string? LastName { get; set; } = null!;
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string Date { get { return DateTime.Now.ToLongTimeString(); } }

public Person(string firstName, string lastName)
Expand All @@ -73,6 +71,6 @@ public Person(string firstName, string lastName)

public override string ToString()
{
return string.Concat(this.FirstName ?? "", " ", this.LastName ?? "");
return string.Concat(FirstName ?? "", " ", LastName ?? "");
}
}
32 changes: 32 additions & 0 deletions CustomEventHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Microsoft.JSInterop;

public class CustomEventHelper
{
private readonly Func<EventArgs, Task> _callback;

public CustomEventHelper(Func<EventArgs, Task> callback)
{
_callback = callback;
}

[JSInvokable]
public Task OnCustomEvent(EventArgs args) => _callback(args);
}

public class CustomEventInterop : IDisposable
{
private readonly IJSRuntime _jsRuntime;
private DotNetObjectReference<CustomEventHelper> Reference;

public CustomEventInterop(IJSRuntime jsRuntime)

Check warning on line 21 in CustomEventHelper.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'Reference' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.
{
_jsRuntime = jsRuntime;
}



public void Dispose()
{
Reference?.Dispose();
}
}
11 changes: 5 additions & 6 deletions Extensions/DocsViewExtension.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using Blazored.LocalStorage;
using Blazor.Analytics;
using Microsoft.Extensions.DependencyInjection;
using allmylinks.Services;
using allmylinks.Services;
using allmylinks.Services.Notifications;
using allmylinks.Services.UserPreferences;
using MudBlazor.Services;
using MudBlazor.Examples.Data;
using Blazor.Analytics;
using Blazored.LocalStorage;
using MudBlazor;
using MudBlazor.Examples.Data;
using MudBlazor.Services;

namespace allmylinks.Extensions
{
Expand Down
20 changes: 9 additions & 11 deletions Extensions/MethodInfoExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Reflection;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;

namespace allmylinks.Extensions
Expand Down Expand Up @@ -62,7 +62,7 @@
{
firstParameter = false;

if (method.IsDefined(typeof(System.Runtime.CompilerServices.ExtensionAttribute), false))
if (method.IsDefined(typeof(ExtensionAttribute), false))
{
if (callable)
{
Expand All @@ -72,7 +72,7 @@
stringBuilder.Append("this ");
}
}
else if (secondParameter == true)
else if (secondParameter)
{
secondParameter = false;
}
Expand Down Expand Up @@ -105,7 +105,7 @@
return stringBuilder.ToString();
}

public static string GetAliases(string value, Type type = null)

Check warning on line 108 in Extensions/MethodInfoExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.
{
switch (value.ToUpperInvariant())
{
Expand All @@ -127,16 +127,14 @@
case "CHAR": return "char";
case "FLOAT": return "float";
default:
{
if (type != null)
{
if (type != null)
{
return string.IsNullOrWhiteSpace(type.FullName) ? RemoveNamespace(type.Name) : RemoveNamespace(type.FullName);
}
else
{
return RemoveNamespace(value);
}
}

return RemoveNamespace(value);
}
}
}

Expand Down
4 changes: 1 addition & 3 deletions Extensions/NavigationManagerExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Linq;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components;

namespace allmylinks.Extensions
{
Expand Down
4 changes: 1 addition & 3 deletions Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.IO.Compression;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.WebUtilities;
Expand Down
Loading
Loading